[TriLUG] Perl question
Greg Brown
gwbrown1 at gmail.com
Fri Mar 13 19:38:35 EDT 2009
Can anyone help me out what this will work:
$ssh = Expect->spawn("ssh -l $username $ip") || die "didn't work: $!\n";
but this will NOT work:
$ssh = Expect->spawn("ssh -l $username $ip") || next;
nor will this
next if (not $ssh = Expect->spawn("ssh -l $username $ip"));
I'd really REALLY like to have the failures skip to the next one.. I've got
over 1000 routers to update tonight via this script and it's killing me
stopping ever 5 or so because TACACS isn't properly configured (or whatever
the malady is).
Any help would be greatly appreciated!!
Greg
More information about the TriLUG
mailing list