$time_zone_func = sub {gmtime()}; # then print $time_zone_func->(); # or print &$time_zone_func;
Though in this case a normal named function seems to be the easiest approach.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
In reply to Re: Variable behaving as a function call
by LanX
in thread Variable behaving as a function call
by dirtdog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |