in reply to Re^3: Appending values to existing hash key
in thread Appending values to existing hash key
should read:join( ', ' => map { $_, @{ $hash{$key}{$_} } } keys $hash{$key} ), +$/;
Nice shortcut (++) - nesting the hashes !join( ', ' => map { $_, @{ $hash{$key}{$_} } } keys %{ $hash{$key} +} ), $/;
What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?
-Larry Wall, 1992
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Appending values to existing hash key
by 2teez (Vicar) on Mar 21, 2014 at 06:56 UTC |