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;}
    }