home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!munnari.oz.au!metro!mama!greyham
- From: greyham@research.canon.oz.au (Graham Stoney)
- Subject: Re: How do I make traps in perl?
- Message-ID: <BtvroL.ICJ@research.canon.oz.au>
- Sender: news@research.canon.oz.au
- Organization: Canon Information Systems Research Australia
- References: <1992Aug26.135146.1759@linda.lidac.liu.se> <1992Aug28.190101.9961@netlabs.com>
- Date: Tue, 1 Sep 1992 03:43:32 GMT
- Lines: 22
-
- lwall@netlabs.com (Larry Wall) writes:
-
- > $SIG{"INT"} = "CATCHINT";
- > ...
-
- > sub CATCHINT {
- > print "OUCH! Don't DO that!!!\n";
- > }
-
- >Nowadays I often just write
-
- > $SIG{INT} = CATCHINT;
-
- On a related topic, how do you prevent such a signal handler from generating a
- "Possible typo" warning when run with -w?.
-
- Graham
- --
- Graham Stoney. Ph: +61-2-805-2909. Totally unrelated message follows:
- Since 1900, there are 23 known cases of innocent people being put to death in
- the USA; but since the execution ends any effort to investigate possible
- misscarriages of justice, the real figure is certainly much higher.
-