in reply to Net::Telnet problems
If you read for input with zero timeout, and then only try and process the data if there's anything to be processed, then the loop will run through both options, regardless of whether there's data on both inputs or not. Don't forget to add in something to stop it looping at high speed, though, or it'll eat all your CPU while it's not doing anything.
An alternative solution is to fork off a process for each tcp connection you're making, as you don't appear to be doing any cross communication between the two in your example code. That way you can wait indefinately on input still.
the hatter
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Net::Telnet problems
by Anonymous Monk on May 08, 2002 at 21:11 UTC |
In Section
Seekers of Perl Wisdom