Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Control C in PERL?

by AgentM (Curate)
on Apr 18, 2001 at 01:52 UTC ( #73363=note: print w/ replies, xml ) Need Help??


in reply to Control C in PERL?

Control-C is a special keyboard character caught by the terminal drivers. It passes the SIGINT to the foreground process. While it's easy to ignore this single character sequence as shown above, it may be better to use Curses to ensure that you ignore ALL input while your loop is running. Also, Curses can help you to "beautify" your output. Also, you could assign ^C a subroutine or some instructions to notify the user that the key is being ignored. The C docs will help you more than the perldocs, so look at man curs_inopts(3X). Good luck!

AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.


Comment on Re: Control C in PERL?
Re: Re: Control C in PERL?
by idnopheq (Chaplain) on Apr 18, 2001 at 06:54 UTC
    You can also use Term::ReadKey to help control the signals. This works better on Win32 systems for some reason.

    HTH
    --
    idnopheq
    Apply yourself to new problems without preparation, develop confidence in your ability to to meet situations as they arrise.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (19)
As of 2014-07-31 19:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (251 votes), past polls