Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Is This Possible?

by Perlbotics (Archbishop)
on Sep 13, 2013 at 12:13 UTC ( [id://1053905]=note: print w/replies, xml ) Need Help??


in reply to Is This Possible?

Use a signal handler (perlipc).

use strict; use warnings; my $max; #-- set a signal handler $SIG{INT} = sub { print "Max: $max -- now leaving...\n"; exit 1; }; #-- main while (<>) { # do something that updates $max } print "Max: $max (finally)\n"; #-- normal termination (exit 0)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-03-29 08:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found