Skip to content

Commit 4234cc2

Browse files
committed
Give $NR a more idiomatic Perl 6 example without using a meta-operator
1 parent 936bad2 commit 4234cc2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/Language/5to6-perlvar.pod6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,8 @@ you can L<zip|/language/operators#index-entry-Z_%28zip_meta_operator%29> with
483483
a L<Range>:
484484
485485
=begin code
486-
for 1..* Z "foo".IO.lines -> ($ln, $text) {
487-
say "$ln: $text"
486+
for "foo".IO.lines.kv -> $n, $line {
487+
say "{$n + 1}: $line"
488488
}
489489
# OUTPUT:
490490
# 1: a

0 commit comments

Comments
 (0)