Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: How can I show all input and output with Expect.pm

by frozenwithjoy (Priest)
on Oct 06, 2014 at 22:02 UTC ( [id://1103024]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    print "$command\n";
    $exp->send("$command\n");
    $exp->expect(1, '-re','\(\d+\)');
    
  2. or download this
    $exp->send("$command\n");
    print "$command\n";
    $exp->expect(1, '-re','\(\d+\)');
    
  3. or download this
    my $counter = 1;
    print "($counter) ";
    
  4. or download this
    my $counter = 0;
    
  5. or download this
    (1) (2) Here is the second command
  6. or download this
    while (<STDIN>) {
      chomp;
    ...
      if ($_ eq "commit") {print "Committing data\n";}
      if ($_ eq "exit")   {print "Exiting program...\n"; exit;}
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-25 14:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found