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

Use a timeout. By skimming through the documentation of Net::SSH::Perl, I couldn't find any timeout option, but you should be able to wrap your constructor call in your own timeout implementation (see alarm). I am not familiar with this module, but I expect, that you have to find your way around safe signals (see perlipc).

Another observation: If a host answers to a ping, it is still alive. Maybe there is something else stopping the initial SSH connection (firewalls? account locked? etc.)... Net::SSH::Perl supports a debug option that might be useful:
$ssh = Net::SSH::Perl->new($hostname, debug => 1);