hmmm, this is covered rather in-depth in "Network Programing with Perl" by Lincold Stein. The problem is usually that you read using somthing similar to <code lang="perl"><SOCKET></code>, which only read one line, and the rest is queued. Usually the way around this is to use un-buffered reads. (see Super Search for node on the subject). Without seeing code, not much else i can say.
Update : Thinking, if Net::Telnet is used, you really don't have control over buffering. Are you using <code lang="perl">$telnet->cmd()</code> ? If so, are you asking it to return and array or a scalar ?
i had a memory leak once, and it ruined my favorite shirt. | [reply] |
Greetings,
I am not sure I understand this completely.
Are you asking the remote box to perform the 'ping' command? (And what does it mean its output is constant?) If so are you sending a limited number of packets (-c, I think) or are you doing an open ended ping? In this last case, I have a feeling that Net::telnet->cmd will not return until the command is over (i.e. never).
Cheers,
alf
You can't have everything: where would you put it? | [reply] |