in reply to Checking if remote exists before calling send
use IO::Socket; my $sock = IO::Socket::INET->new('some_server'); $sock->read(1024,$data) until $sock->atmark; [download]