use Expect; system('exit'); my $exp = Expect->new; $exp->spawn( 'vpnclient.exe connect "VPN NAME" user "username" pwd "password"' ); $exp->expect( 10, [ qr/Do you wish to continue/i => sub { $exp->send('y'); $exp->exp_continue; } ] );
In reply to Re^2: yes/no prompt
by friedo
in thread yes/no prompt
by russH3
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |