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


my @numbers =  <4 8 15 16 23 42>; my $range = 0..2; .say for @numbers[$range];
# OUTPUT«16␤»
# expected:
# OUTPUT«4␤8␤15␤»

# also binding to $range provides the expected result
my @numbers =  <4 8 15 16 23 42>; my $range := 0..2; .say for @numbers[$range];
# OUTPUT«4␤8␤15␤»
y

Reply via email to