starzstar has asked for the wisdom of the Perl Monks concerning the following question:
I have the following perl expect script, the send function does not work, basically I need to enter 'y' for an interactive script , but the following script does not send 'y'
can some one please check why send does not work.
Thanks ..
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";
Back to
Seekers of Perl Wisdom