File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ Synopsis 9: Data Structures
13
13
14
14
Created: 13 Sep 2004
15
15
16
- Last Modified: 4 Jan 2011
17
- Version: 50
16
+ Last Modified: 5 Mar 2012
17
+ Version: 51
18
18
19
19
=head1 Overview
20
20
@@ -250,11 +250,12 @@ because they all end up meaning the same thing.
250
250
There is no autotruncation on the left end. It's not that
251
251
hard to write C<0>, and standard indexes always start there.
252
252
253
- As a special form, subscript declarations may add a C<:map> modifier
253
+ Subscript size declarations may add a named C<:map> argument
254
254
supplying a closure, indicating that all index values are to be mapped
255
255
through that closure. For example, a subscript may be declared as cyclical:
256
256
257
- my @seasons[4:map(*%4)];
257
+ my @seasons[4, :map( * % 4 )];
258
+ my @seasons[4, :map{ $_ % 4 }]; # same thing
258
259
259
260
In this case, all numeric values are taken modulo 4, and no range truncation can
260
261
ever happen. If you say
You can’t perform that action at this time.
0 commit comments