in reply to Re: yes/no prompt
in thread yes/no prompt
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; } ] );
|
|---|