Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: regular expression matching in expect

by aitap (Curate)
on Aug 09, 2012 at 20:27 UTC ( [id://986604]=note: print w/replies, xml ) Need Help??


in reply to Re^2: regular expression matching in expect
in thread regular expression matching in expect

Well, what error message do you receive? According to the documentation, near the New more Tcl/Expect-like interface of $object->expect(), you can return 'exp_continue' symbol from your callback sub to continue matching with next callback.
Are you sure it won't be easier to use some SSH-related modules, for example, Net::SSH::Expect?
Sorry if my advice was wrong.

Replies are listed 'Best First'.
Re^4: regular expression matching in expect
by cmastays (Initiate) on Aug 09, 2012 at 23:05 UTC

    I did try using exp_continue; statement after every send but that didnt seem to help either.

    BTW. what advantage will Net::ssh offer that Use Expect doesnt?

      I did try using exp_continue; statement after every send but that didnt seem to help either.
      Did you try returning it?

      what advantage will Net::ssh offer that Use Expect doesnt?
      More clean Perl code? You will need only to do things in ssh instead of running ssh manually and agreeing with it.

      Sorry if my advice was wrong.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-26 08:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found