[TriLUG] Perl. Help. Needed.

Michael Peters mpeters at plusthree.com
Wed Mar 11 15:32:13 EDT 2009


Greg Brown wrote:

>         $ssh->expect(30,'(tcl)') || die "Never got the tcl prompt: $!\n";
> 
>         open(STDOUT, ">./configs/$fileName") || die "can't write to
> ./configs/$fileName: $!\n";

Try reversing those 2 lines. I'd suspect that Expect has already gotten it's 
hold on STDOUT so when you tell Perl to use something else as STDOUT, Expect 
won't be listening.

-- 
Michael Peters
Plus Three, LP




More information about the TriLUG mailing list