gfarhat has asked for the wisdom of the Perl Monks concerning the following question:
I'm using the following script to add multiple values to a hash
foreach $val (@array){
@tmp=split(/,/,$val);
push ( @{ $hash{$tmp 1 }}, $tmp[0]);
}
I want to sort that hash, and print only the values for the first keys
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: hash first value
by FunkyMonk (Bishop) on Apr 10, 2008 at 15:15 UTC | |
|
Re: hash first value
by pc88mxer (Vicar) on Apr 10, 2008 at 15:45 UTC | |
|
Re: hash first value
by Corion (Patriarch) on Apr 10, 2008 at 15:08 UTC | |
by gfarhat (Novice) on Apr 10, 2008 at 15:13 UTC | |
by Fletch (Bishop) on Apr 10, 2008 at 15:44 UTC | |
by aufflick (Deacon) on Apr 11, 2008 at 01:09 UTC |