- or download this
my $key;
while(undef($key)) {
$key = <STDIN>;
}
- or download this
my $key;
my $term = new POSIX::Termios;
...
while( read(STDIN,$key,1) ) {
last if(defined($key));
}
- or download this
$term->setlflag(ICANON); # set back to canonical mode
$term->setattr(0,TCSANOW); # apply it to STDIN
undef($term); # cleaning up