Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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??


in reply to Sending commands to a Telnet Server

Are you unbuffering the right file handle? $|=1 affects the currently-selected filehandle. Be sure you're doing this:
select(MUX_OUTPUT); $|=1; select(STDOUT); print MUX_OUTPUT "this is unbuffered\n";
Though you will avert this headache by following merlyn's advice and giving Net::Telnet a try. If you prefer more control, use IO::Socket and/or Expect and set up the connection to the MUSH yourself:
my $mush = new IO::SOCKET::INET ("mush.example.com:8080") or die "Couldn't connect to MUSH: $@"; print $mush "command\n"; my $response = <$mush>;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://42395]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2024-04-19 08:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found