home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / perl / 5650 < prev    next >
Encoding:
Text File  |  1992-09-01  |  1.1 KB  |  34 lines

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