Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Sending commands to a Telnet Server

by Fastolfe (Vicar)
on Nov 19, 2000 at 07:13 UTC ( [id://42395] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    select(MUX_OUTPUT); $|=1; select(STDOUT);
    print MUX_OUTPUT "this is unbuffered\n";
    
  2. or download this
    my $mush = new IO::SOCKET::INET ("mush.example.com:8080")
       or die "Couldn't connect to MUSH: $@";
    
    print $mush "command\n";
    my $response = <$mush>;