in reply to Re: Re: redirecting stdin on windows
in thread redirecting stdin on windows
Funny, it works for the following (on WinXP):
script.planswer.txtprint "username: "; chomp ($uname = <STDIN>); print "\npassword: "; chomp ($password = <STDIN>); print "\nYou entered username $uname and password $password\n";
And I'm calling it like this:someusername somepassword
...which produces this:perl script.pl < answer.txt
...which is the expected output.C:\test\scratch>perl script.pl < answer.txt username: password: You entered username someusername and password somepassword
|
---|