Help for this page

Select Code to Download


  1. or download this
    Starting EXPECT pattern matching...
     at /usr/local/share/perl5/Expect.pm line 597
    ...
    <----here it receives the prompt!!!!
    [local]MyPrompt> Returning from expect successfully.
      spawn id(4): accumulator: ` '<----You can see that the buffer is dum
    +ped
    
  2. or download this
        my ($exp, $cmd) = @_;
        $exp->print($cmd, "\n");
    ...
        my $output = $exp->before;
        $output =~ s/^$cmd\n//;  # remove the sent cmd
        return $output;