in reply to Re: Re: Catching timeout for Net::Telnet
in thread Catching timeout for Net::Telnet

Go back and re-read my original post. You need to move all the operations on $t inside the eval {}. It's probably the open or login that's die()ing, not the Net::Telnet->new, anyway.

If there's a failure at some point, you probably want to give up on the entire telnet session. After all, if the login fails, what's the chance of "cd /home/dir" working? If you put everything in the eval {}, the first one that dies will jump to the end of the eval block, skipping over the other commands.

  • Comment on Re: Re: Re: Catching timeout for Net::Telnet

Replies are listed 'Best First'.
Re: Re: Re: Re: Catching timeout for Net::Telnet
by HeffaK (Initiate) on May 10, 2001 at 00:03 UTC
    That did it... :) Thank you and Thank you again. HeffaK