use Expect; my $login ="/my/app/test autoupdate"; my $update = Expect->spawn($login) or die "Can't run autoupdate : $!\n +"; print "Autoupdate $login\n"; if($update->expect(6,'Update?')){ print "spawn continue"; my $exp = Expect->send("y\r");} else { print "not spawn";} print "Test is $exp";
In reply to expect send is not working by starzstar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |