Skip to content

Commit e9bbef9

Browse files
committed
Add @foo.kv example to for sample code.
1 parent 8fa7964 commit e9bbef9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/Language/control.pod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,8 @@ as many elements from the list as needed before running the block.
317317
318318
=begin code
319319
320-
for %hash.kv -> $key, $value { print "$key => $value\n" }
320+
for @foo.kv -> $idx, $val { say "$idx: $val" }
321+
for %hash.kv -> $key, $val { say "$key => $val" }
321322
for 1, 1.1, 2, 2.1 { say "$^x < $^y" } # says "1 < 1.1" then says "2 < 2.1"
322323
323324
=end code

0 commit comments

Comments
 (0)