in reply to
redirecting stdin on windows
What you're asking to do doesn't require Perl at all - the shell can already do it. Create a text file with the username on one line and the password on the next <insert speech about how you shouldn't store passwords in plaintext>. Then, you can simply do myexe.exe < answer.txt where answer.txt is the "answer file" you created.
If you really wanted to get Perl involved for some other reason, you could do this same thing from a call to system.
"One word of warning: if you meet a bunch of Perl programmers on the bus or something, don't look them in the eye. They've been known to try to convert the young into Perl monks." - Frank Willison