@@ -72,6 +72,12 @@ This will evaluate `BLOCK` for each element of `LIST`, aliasing `VAR` to each
7272element. Its behavior will otherwise match ` map BLOCK LIST ` . It is only
7373possible to use ` my ` variables for this.
7474
75+ ### ` grep my VAR BLOCK LIST `
76+
77+ This will evaluate ` BLOCK ` for each element of ` LIST ` , aliasing ` VAR ` to each
78+ element. Its behavior will otherwise match ` grep BLOCK LIST ` . It is only
79+ possible to use ` my ` variables for this.
80+
7581### ` map my (VAR, VAR) BLOCK LIST `
7682
7783This will evaluate ` BLOCK ` for each set of two elements in ` LIST ` , aliasing
@@ -82,6 +88,17 @@ On the last iteration, there may not be enough elements remaining to fill
8288every ` VAR ` slot. In this case, a warning will be issued, and the extra ` VAR `
8389slots will be filled with ` undef ` .
8490
91+ ### ` grep my (VAR, VAR) BLOCK LIST `
92+
93+ This will evaluate ` BLOCK ` for each set of two elements in ` LIST ` , aliasing
94+ the ` VAR ` to the first of each set, and the second ` VAR ` to the second. More
95+ than two variables can be used to iterate over sets of three or more items.
96+
97+ On the last iteration, there may not be enough elements remaining to fill
98+ every ` VAR ` slot. In this case, a warning will be issued, and the extra ` VAR `
99+ slots will be filled with ` undef ` . The extra ` undef ` values used will also be
100+ included in the returned list.
101+
85102## Backwards Compatibility
86103
87104As the syntax chosen is currently invalid, it should not present any backwards
0 commit comments