--- Oskar Norin <[EMAIL PROTECTED]> wrote: > I having trouble to use Net:Telnet:Cisco lib because it > exits the program when its not able to connect to a host. > How can I a prevent it from exiting and just read the > error message and continue with the next host.
eval { # Do code } if ($@) { # It broke } This is how you catch errors, $@ contains the message that would normally be printed when the script dies. This is Perl's exception mechanism. Put this around *just* the bit that could fail, not everything. Read more at: perldoc -f eval Jonathan Paton __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]