http://qs1969.pair.com?node_id=157255

arc_of_descent has asked for the wisdom of the Perl Monks concerning the following question:


Hi Monks,
I'm using ActiveState's perl and I downoaded the Term::ReadKey
module as my intention is to build a simple shell program.
I started my adventure with deciding to conquer ReadKey.
However, i am facing sme problems (as always).

#!/usr/bin/perl -w use strict; use Term::ReadKey; my $key; ReadMode 'raw'; $key = ReadKey(0); print "Key is ", ord($key), "\n"; ReadMode 0; print "hit enter to exit...\n"; <>;
Now, above program works great for all keys, except
the Enter(\n) key. If i press Enter as the first key
The ReadKey function doesn't return until i press another key.
Is this a quirk with Term::ReadKey on windows platform,
or am i doing something wrong?

Thanx for any help

arc_of_descent