in reply to Run 2 Subroutines after a die
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.
|
---|