Help for this page
use IO::Socket; my $sock = IO::Socket::INET->new( ... print( STDERR "$host: could not connect: $!" ); exit( 1 ); }
my ( $r, $resp ); while (sysread($sock, $r, 1024) >= 1) { ... $resp =~ /prompt>/ and last; } print $sock "$username\n";