In relation to your second question, the 1 in the die message is returned by the print in sub Two and then returned by the do{}.
To get a more useful error message you could do this:
open TST, "$var1" or die do { One(); Two(); "Couldn't open file $var1: $!.\n"; };
--
John.
In reply to Re: Run 2 Subroutines after a die
by jmcnamara
in thread Run 2 Subroutines after a die
by AcidHawk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |