in reply to Re^2: What does return() mean?
in thread What does return() mean?
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
|
|---|