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

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!unipalm!ian
  3. From: ian@unipalm.co.uk (Ian Phillipps)
  4. Subject: Re: How do I make traps in perl?
  5. Message-ID: <1992Sep2.122722.22017@unipalm.co.uk>
  6. Organization: Unipalm Ltd., 216 Cambridge Science Park, Cambridge CB4 4WA, UK
  7. References: <1992Aug26.135146.1759@linda.lidac.liu.se> <1992Aug28.190101.9961@netlabs.com>
  8. Date: Wed, 2 Sep 1992 12:27:22 GMT
  9. Lines: 19
  10.  
  11. lwall@netlabs.com (Larry Wall) writes:
  12.  
  13. >    sub CATCHINT {
  14. >    print "OUCH! Don't DO that!!!\n";
  15. >    }
  16.  
  17. I've wanted the equivalent of a longjmp to allow a sig handler to yank
  18. me out of nest of routines etc, and plonk me down somewhere standard
  19. (e.g. a main STDIN-reading loop). The "goto" spec is so discouraging
  20. that I've not even tried it, and nothing else seems to fit.
  21.  
  22. I *could* just stay in the handler, but that doesn't have too good
  23. long-term consquences.
  24.  
  25. Ian
  26. -- 
  27. Ian Phillipps, Unipalm Ltd, 216 Science Park,        Phone +44 223 420002
  28. Milton Road, Cambridge, CB4 4WA, England.        Phax  +44 223 426868
  29.     The road to hell is paved with melting snowballs - Larry Wall
  30.