in reply to Re: Closures and lexical scope
in thread Closures and lexical scope

I understand now. By adding $name = $name; to the closure, the DESTROY() call is done after the "End of program" line is printed.

Thank you! :-)

------
We are the carpenters and bricklayers of the Information Age.

The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.