Subject: | ReadKey failure with newline in ActivePerl |
Hi,
I'm using Active Perl:
This is perl, v5.10.1 built for MSWin32-x86-multi-thread
(with 2 registered patches, see perl -V for more detail)
Copyright 1987-2009, Larry Wall
Binary build 1007 [291969] provided by ActiveState
http://www.ActiveState.com
Built Jan 26 2010 23:15:11
If I execute the code below, it takes four presses of the carriage
return before the program exits. The output is "13 was typed". I need
to figure out a way to be in mode 3 (cbreak) and still sense each CR.
code:
# perl
use Term::ReadKey;
ReadMode 3;
$k = ReadKey 0;
warn ord($k) . " was typed\n";
exit(0);