Hi All,
I am writing a script for getting the ASCII value for the keyboard input.
The script:
#!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 after downloading ReadKey.pm at the perl location, I am getting the following error:
C:\Perl\site\lib\Term>perl e:\ET.pl
Can't locate loadable object for module Term::ReadKey in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at e:\ET.pl line 12
Compilation failed in require at e:\ET.pl line 12.
BEGIN failed--compilation aborted at e:\ET.pl line 12.
Kindly suggest.