in reply to Re: Hash printing problem
in thread Hash printing problem
map {my $key = $_; $key =~ s/^([a-z]+).*/$1/i; push @{$alphaKeys{$ke +y}}, $_} keys %hoh;
Obfuscatory map in void context. I especially like the ", $_" you threw on the end so that map would return something meaningful (but useless) to its void context.
for( keys %hoh ) { push @{ $alphakeys{ (/^([a-z]+)/)[0] } }, $_; }
Though I'm guessing this is just a result of an incomplete refactoring.
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Hash printing problem (map => for)
by GrandFather (Saint) on Mar 06, 2006 at 19:46 UTC |