The stupid question is the question not asked | |
PerlMonks |
Re: What is safe to do in an END block?by starbolin (Hermit) |
on Jun 01, 2008 at 05:08 UTC ( [id://689514]=note: print w/replies, xml ) | Need Help?? |
It all depends on whether you want the code executed after a die call or not. Remember that the code inside the END block will be executed after a die. So if, as in your case, the database was not successfully opened, your END code needs to detect that. Other than that one caution, I wouldn't hesitate to put what you need into an END block. That is what it is there for.
s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}
In Section
Seekers of Perl Wisdom
|
|