CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
Taking a Term::ReadKey(-1) at anytime during program



Jun 4, 2000, 1:51 PM

Post #1 of 1 (1796 views)
Taking a Term::ReadKey(-1) at anytime during program Can't Post

What I want to do is to be able to take a keypress at ANY time during the execution of my program. I am using Term::ReadKey(-1) (non-blocked mode) and all I want to do is read the keypress and immediately send it via Net::Telnet->print(); Immediately. Yes immediately. Not have to wait for the loop it is in to complete.

Unfortunately due to a large number of if's loop's etc within the main structure the checkForInput function is only executed about once every 3 seconds and what the user sees is
h...i... ...h...o...w... ...a...r...e... ...y...o...u...\n (each . = 1 second). And it makes for some really annoying typing.

Anybody who can help can have a cookie! Just have to drive to Seattle.



Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives