Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Re: Re: redirecting stdin on windows

by myocom (Deacon)
on Aug 21, 2002 at 16:36 UTC ( #191787=note: print w/replies, xml ) Need Help??

in reply to Re: Re: redirecting stdin on windows
in thread redirecting stdin on windows

Funny, it works for the following (on WinXP):
print "username: "; chomp ($uname = <STDIN>); print "\npassword: "; chomp ($password = <STDIN>); print "\nYou entered username $uname and password $password\n";
someusername somepassword
And I'm calling it like this:
perl < answer.txt
...which produces this:
C:\test\scratch>perl < answer.txt username: password: You entered username someusername and password somepassword
...which is the expected output.
"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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://191787]
[atcroft]: .oO(Then there is the effect if a site changes their timezone, such as when the International Date Line was moved by the purchase of Alaska by the US from Russia in 1867, or several places (I cannot recall off-hand) that moved from one side of the Date
[atcroft]: Line to the other recently....)

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2017-04-29 04:49 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (531 votes). Check out past polls.