Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: regular expression matching in expect

by aitap (Deacon)
on Aug 09, 2012 at 20:27 UTC ( #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.


Comment on Re^3: regular expression matching in expect
Download Code
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
Node Status?
node history
Node Type: note [id://986604]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (13)
As of 2014-07-28 18:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (206 votes), past polls