I've racked my brain for an answer to this one. Probably real simple.....
I'd like to run a process reatedly until entering a character on the
keyboard (other than ^C). When the character is entered the process would
complete some final tasks and exit the program.
do {
# a process
$Keyboard_Input = (check_for_input);
} until ($Keyboard_Input);
# some final tasks
I've tried to use the standard input file <STDIN> without success.
I've tried
$Keyboard_Input = <STDIN>; which just halts the script until the Enter key
is pressed.
$Keyboard_Input = eof (STDIN); which halts until the Enter key is pressed
and then returns a null character thereafter
$Keyboard_Input = tell (STDIN); which returns a '0' character even if the
Enter key is pressed,
OK, so what am I missing here? Do I need to use something other than the
Standard Input File structure?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>