Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Run 2 Subroutines after a die

by Dog and Pony (Priest)
on Oct 03, 2002 at 07:46 UTC ( #202453=note: print w/ replies, xml ) Need Help??


in reply to Run 2 Subroutines after a die

This is one way of doing it (I assume your subs are cleanup routines rather than routines that should output stuff in the die message?):

open TST, ">>$var1" or One(), Two(), die "Could not open '$var1': $!";
If that is any clearer may be disputed... I think it is, but some may disagree. Maybe '&&' instead of commas are more intiutive between the calls? That works too.

The '1' is, as pointed out, what do returns to your die for printing.

Hope that helps.


You have moved into a dark place.
It is pitch black. You are likely to be eaten by a grue.


Comment on Re: Run 2 Subroutines after a die
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2014-12-27 11:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls