[Ssh-sftp-perl-users] net::ssh::perl error handling
Brought to you by:
dbrobins
From: fred s. <Fre...@6p...> - 2003-12-02 13:32:13
|
Hi im working on a script that uses Net::SSH::Perl The problem is that i dont know how to handle errors properly. When the script tries to connect to a host that has no sshd running=20 or is completly down then the script exits with a error like: Can't connect to x.x.x.x, port 22: Connection timed out at /usr/lib/perl5/site_perl/5.8.0/Net/SSH/Perl.pm line 206. but it would be much nicer if the error would be stored in a var and the script continues. Or at least it should die with a proper message. i tried something like: $ssh =3D Net::SSH::Perl->new($host) || die "error connecting to $host"; but had no success :/ any help is welcome twix -- http://www.tuxhilfe.de.vu _____________________________________________________________ ---------------------------------------- Kein Freibier - aber kostenlose Email ;-) http://www.6pack.de --- Webhosting G=C3=BCnstig und zuverl=C3=A4ssig: http://www.kissl.de |