use strict; # ALWAYS! $a = LetterPrinter( "a" ); $b = LetterPrinter( "b" ); $a->(); # these can also be called with ampersand $b->(); # ie: &$b; sub LetterPrinter { my $letter = shift; return sub{ print $letter, $/ }; }
In reply to Re: access to my variables from other subs
by Adam
in thread access to my variables from other subs
by joe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |