in reply to Re: Net::SSH::Perl hanging on creating object
in thread Net::SSH::Perl hanging on creating object

I think nc approach is better:
if ( ! system ("nc -z -w 2 myexample.com 22 2> /dev/null")) { print "ok"."\n" }
Regards,