Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Non-blocking read

by wog (Curate)
on Nov 12, 2001 at 23:11 UTC ( [id://124892]=note: print w/replies, xml ) Need Help??


in reply to Non-blocking read

Probably the easiest, and most portable (since, apparently, Windows perl only supports select for sockets, not to mention that it probably doesn't support termios.), way to do this would be to use Term::ReadKey:

use Term::ReadKey; for (;;) { if (defined(my $c = ReadKey(-1))) { # got a character $c, process } # do other stuff }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://124892]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-19 23:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found