It is not so easy to do this directly from STDIN, you might be better off using Term::ReadKey:
use Term::ReadKey; my $done = 0; my $choice; ReadMode 4; while ( !$done ) { if ( defined( $key = ReadKey(-1) ) ) { $choice = uc ( $key); $done = 1 if $choice eq 'Q'; } } + ReadMode 0;
/J\
In reply to Re: How do I loop until keyboard input?
by gellyfish
in thread How do I loop until keyboard input?
by skitchy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |