XP is just a number | |
PerlMonks |
Execute function before exit of do() blockby gri6507 (Deacon) |
on Jan 29, 2014 at 17:47 UTC ( [id://1072553]=perlquestion: print w/replies, xml ) | Need Help?? |
gri6507 has asked for the wisdom of the Perl Monks concerning the following question:
Fellow monks, I have two script, main and helper, where the latter is executed by the former using a do() statement. I would like to do something on abnormal terminations of the helper. I tried using an END {} block withing the helper to do that, but unfortunately it seems to only execute on completion of the main script. Here is my main script
Here is my helper script
As expected, the helper "There" message is not printed, but the "Good bye" message is printed only after "Done with main". How can I reverse the order of those two events?
Back to
Seekers of Perl Wisdom
|
|