I've have a program that reads input from STDIN like so: example: program < file.txt
and then I try to read a password from STDIN that the user types in but it skips right over that section. Do I have to do anything to STDIN before I try to get user input from it? Perhaps close and reopen it?
--snip # read all of STDIN while($line = ReadLine(0)){ $STDIN .= $line; }
#then ask for user password if($password){ print "$user password: "; ReadMode('noecho');
##################################### # skips over, doesn't ask for user input ##################################### $DBPASS = ReadLine(0); ReadMode('restore'); print "hi $DBPASS\n"; chop($DBPASS); }
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>