Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Net::Telnet: how to detect an empty line...

by glide (Pilgrim)
on Feb 27, 2008 at 12:41 UTC ( #670613=note: print w/replies, xml ) Need Help??


in reply to Net::Telnet: how to detect an empty line...

Hi,
probably you can use a empty line has a prompt in the Net::Telnet
$t = new Net::Telnet (Prompt => /^$/);

But, if you have empty lines in the command output, you'll get a truncated output. In that case you can use the waitfor method.

And to better understand the interaction between the client e server, use the input_log and the dump_log, it's a great tool for debug.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://670613]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2018-06-25 14:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (126 votes). Check out past polls.

    Notices?