Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Control C in PERL?

by AgentM (Curate)
on Apr 18, 2001 at 01:52 UTC ( [id://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.

Replies are listed 'Best First'.
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.

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

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-23 02:15 GMT
Find Nodes?
    Voting Booth?

    No recent polls found