[TriLUG] Perl question

Greg Brown gwbrown1 at gmail.com
Sat Mar 14 00:40:43 EDT 2009


No, it's not too late and thank you!

I'll give it a whirl.

120 routers to go...

On Sat, Mar 14, 2009 at 12:12 AM, William Sutton <william at trilug.org> wrote:

> I, um, "expect" that this is too late, but
>
> eval {
>  $ssh = Expect->spawn("ssh -l $username $ip") || die "didn't work: $!\n";
> };
> next if $@;
>
> William Sutton
>
>
> On Fri, 13 Mar 2009, Greg Brown wrote:
>
>  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
>> --
>> TriLUG mailing list        :
>> http://www.trilug.org/mailman/listinfo/trilug
>> TriLUG FAQ  : http://www.trilug.org/wiki/Frequently_Asked_Questions
>>
>>  --
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG FAQ  : http://www.trilug.org/wiki/Frequently_Asked_Questions
>



More information about the TriLUG mailing list