Hi,
I am learning perl. Here is the script from which I can get the ASCII values from the keyboard entry made by the user.
#!c:\perl\bin -w
# sascii - Show ASCII values for keypresses
use Term::ReadKey;
ReadMode('cbreak');
print "Press keys to see their ASCII values. Use Ctrl-C to quit.\n";
while (1) {
$char = ReadKey(0);
last unless defined $char;
printf(" Decimal: %d\tHex: %x\n", ord($char), ord($char));
}
ReadMode('normal');
But when I execute the script I am getting the following error even after installing the ReadKey.pm into the perl\site\lib.
ERROR:
E:\>perl ET.pl
Can't locate Term/ReadKey.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at ET.pl line 11.
BEGIN failed--compilation aborted at ET.pl line 11.
Any Light shed in this regard will be admired and appreciated. :eek: