If you actually want to return a code/subroutine reference see sub or the \ operator (see Symbolic Unary Operators in perlop)
c:\@Work\Perl>perl -wMstrict -le "sub S { return sub { print qq{hiya $_[0]}; }; } ;; my $coderef = S(); $coderef->('sailor') " hiya sailor
In reply to Re^3: What does return() mean?
by AnomalousMonk
in thread What does return() mean?
by yistaaa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |