in reply to order in map
my %hash = map { "stuff_$_" => $_ } <== qw(asdf qwert zxcv);
... as per Synopsis 3. There may be some other new way to do this (?) in perl6 as well.
Update: It seems they are still wrestling with this in perl6 (see section on map), although the piping I use above is one way to disambiguate and is not available in perl5.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: order in map
by Anonymous Monk on May 04, 2005 at 15:46 UTC | |
by ryantate (Friar) on May 04, 2005 at 17:05 UTC |