perl Term::ReadKey equivalent - TechRepublic
Question
January 29, 2007 at 08:01 AM
dlauxx

perl Term::ReadKey equivalent

by dlauxx . Updated 19 years, 5 months ago

It seems my previous post on the same question is lost… 🙁

Tried to accept user response from keyboard like “Press any key to continue …” type of thing.

perl code (simplified):-

#!use/per/bin;
use Term:ReadKey;

for $i {
print “Press any key to continue: “;
ReadMode ‘cbreak’;
$ans=ReadKey(0);
ReadMode=’normal’;
}

It doesn’t work. server side perl code stops after the print statement. No error though. Learned that Term::ReadKey is not working for Win32.

Any other codes I can use?

Please help, thx.

This discussion is locked

All Comments