Help for this page

Select Code to Download


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