|
|
| There's more than one way to do things | |
| PerlMonks |
Re: Overloading '{}' or 'sub'by jasonk (Parson) |
| on Jan 01, 2009 at 20:06 UTC ( #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
|
|
||||||||||||||||||||||