P is for Practical | |
PerlMonks |
Re: Term::ReadKey under win32by kart124 (Initiate) |
on Jul 03, 2007 at 12:30 UTC ( [id://624661]=note: print w/replies, xml ) | Need Help?? |
Hey here is something that works on my windows XP box.
here is the code:
#!/usr/bin/perl -w
use Term::ReadKey;
print "Gimme a word: ";$|++;
while (1) {
$|++;
ReadMode 5;
$key = ReadKey (10);
chomp ($key);
ReadMode "normal";
printf "*";
$|++;
#printf "\nYou said %s, char number %03d\n",
#$key, ord $key;
last if ($key =~ /\r\n/);
}
print "\n";
-Thanks
kart124
In Section
Seekers of Perl Wisdom
|
|