Changeset 23243
- Timestamp:
- 02/02/06 20:55:46 (3 years ago)
- Files:
-
- 1 modified
-
doc/trunk/design/syn/S05.pod (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
doc/trunk/design/syn/S05.pod
r23233 r23243 14 14 Maintainer: Patrick Michaud <pmichaud@pobox.com> 15 15 Date: 24 Jun 2002 16 Last Modified: 16 Nov 200516 Last Modified: 2 Feb 2006 17 17 Number: 5 18 Version: 818 Version: 9 19 19 20 20 This document summarizes Apocalypse 5, which is about the new regex … … 1958 1958 # of two subcaptures... 1959 1959 1960 for @{$<pairs>} => $pair {1960 for @{$<pairs>} -> $pair { 1961 1961 say "Key: $pair[0]"; 1962 1962 say "Val: $pair[1]"; … … 1970 1970 # the two subcaptures within the subpattern 1971 1971 1972 for @{$<pairs>} => $key, $val {1972 for @{$<pairs>} -> $key, $val { 1973 1973 say "Key: $key"; 1974 1974 say "Val: $val"; … … 1990 1990 # <pair> subrule call... 1991 1991 1992 for @{$<pairs>} => $pair {1992 for @{$<pairs>} -> $pair { 1993 1993 say "Key: $pair[0]"; 1994 1994 say "Val: $pair[1]"; … … 2003 2003 # by each match of the <pair> subrule... 2004 2004 2005 for @{$<pairs>} => $key, $val {2005 for @{$<pairs>} -> $key, $val { 2006 2006 say "Key: $key"; 2007 2007 say "Val: $val"; … … 2098 2098 Outside the rule, C<%0> is a shortcut for C<%{$0}>: 2099 2099 2100 for %0 => $pair {2100 for %0 -> $pair { 2101 2101 say "One: $pair.key"; 2102 2102 say "Many: { @{$pair.value} }";
