Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Perlnet Telnet issue with ->

by keszler (Priest)
on Jan 15, 2010 at 20:30 UTC ( #817693=note: print w/replies, xml ) Need Help??


in reply to Perlnet Telnet issue with ->

Your waitfor is a regular expression consisting of a single > character; I assume that's part or all of the system prompt that appears when the info command is complete. The problem is that the > character appears in the output of the info command.

The solution is to waitfor something else. If there are other characters that always appear in the system prompt, include them in the waitfor regex.

A fragile solution is to waitfor a > not preceeded by a dash, as in the info command's output. A regex for this:

# match > at the beginning of a line or not preceeded by - @infosyst=$telnet->waitfor('/(\A|[^-])>/');

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2020-10-24 01:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (242 votes). Check out past polls.

    Notices?