# New Ticket Created by   
# Please include the string:  [perl #127600]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=127600 >


Code sample:

my $anon = -> $x, $y {return $x * $y};

say $anon(3,7);

Produces this output:

Attempt to return outside of any Routine
  in block <unit> at simple.pl6 line 3


Since anonymous subroutine returns the product of the two numbers,
one would think that a "return" would be acceptable within the code.

Reply via email to