in reply to Re: Sorting array with multiple values per keys
in thread Sorting array with multiple values per keys
my @a2 = map { s/,/,y,/; s/\A/x,/; +{ split /,/ } } @a1;
is clearer as
my @a2 = map { /(.*),(.*)/; ( x => $1, y => $2 ) } @a1;
my @a2 = map { /(.*),(.*)/; { x => $1, y => $2 } } @a1;
Update: Switched from parens to curlies as per reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Sorting array with multiple values per keys
by betterworld (Curate) on Aug 12, 2008 at 23:58 UTC | |
|
Re^3: Sorting array with multiple values per keys
by kyle (Abbot) on Aug 13, 2008 at 15:44 UTC |