next up previous contents
Next: How to Handle a Up: Handling Errors and Signals Previous: Using the eval() Function

Signals

Signals are messages sent by the operating system to the process running your Perl script. At any time, a signal that must be answered can be sent to your process. Normally, a default handler is used to take care of a signal. For example, under Windows 95, when you press the Ctrl+C key combination, your process is sent an INT or interrupt signal.

The default handler responds by ending the process and displays the following message:

^C at test.pl line 22

Of course, the filename and line number change to match the particulars of whatever script happens to be running when Ctrl+C was pressed. The ^C notation refers to the Ctrl+C key sequence.



 

dave@cs.cf.ac.uk