Changeset 23238
- Timestamp:
- 01/30/06 23:34:39 (3 years ago)
- Files:
-
- 1 modified
-
doc/trunk/design/syn/S06.pod (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
doc/trunk/design/syn/S06.pod
r23235 r23238 14 14 Maintainer: Larry Wall <larry@wall.org> 15 15 Date: 21 Mar 2003 16 Last Modified: 20 Jan 200616 Last Modified: 30 Jan 2006 17 17 Number: 6 18 Version: 1 318 Version: 14 19 19 20 20 … … 357 357 doit :b(%hash{'b'}),1,2,3; 358 358 359 To pass pairs out of hash without their being interpreted as named 360 parameters, use 359 Ordinary hash notation will just pass the value of the hash entry as a 360 positional argument regardless of whether it is a pair or not. 361 To pass both key and value out of hash as a positional pair, use C<:p>. 361 362 362 363 doit %hash<a>:p,1,2,3; 363 364 doit %hash{'b'}:p,1,2,3; 364 365 365 instead. 366 instead.. (The C<:p> stands for "pairs", not "positional"--the 367 C<:p> adverb may be placed on any hash reference to make it mean 368 "pairs" instead of "values".) 366 369 367 370 Pairs are recognized syntactically at the call level and mystically
