good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Overloading '{}' or 'sub'by jasonk (Parson) |
on Jan 01, 2009 at 20:06 UTC ( [id://733661]=note: print w/replies, xml ) | Need Help?? |
See Scope::Guard, which is designed to do exactly that, you create it with a subroutine to run when it goes out of scope...
In Section
Seekers of Perl Wisdom
|
|