Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Writing Interrupt proram in PERL

by Joost (Canon)
on Oct 01, 2009 at 10:30 UTC ( #798592=note: print w/ replies, xml ) Need Help??


in reply to Writing Interrupt proram in PERL

The low-level way of handling this sort of thing is to setup all your IO (including the terminal input) as non-blocking, and then use select to dispatch code whenever input arrives or output is flushed at a socket/handle, and possibly do other stuff in between.

I'd recommend POE::Wheel::Readline in this case - it takes care of a lot of stuff for you, but you do need to read up a bit on POE. See also the example at the poe.perl.org site

updated: fixed link to PWR


Comment on Re: Writing Interrupt proram in PERL

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2015-07-06 04:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls