Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 pondering the Monastery: (5)
As of 2024-04-20 20:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found