You're forming a closure on $thing, as well as returning a reference to it. voodoo() indeed!
One nice way to pretend you don't have a global variable when you do (I've talked about this one before):
No sigil, that makes some people happy ;-){ my $foo; sub foo () :lvalue { $foo } } foo = 'bar'; print foo, $/;
After Compline,
Zaxo
In reply to Re^3: getting data to a signal handler
by Zaxo
in thread getting data to a signal handler
by pileofrogs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |