in reply to How to compare hash value
assuming $; doesn't appear in any of your values.my %merge; for my $key ( keys %myhash ) { push $merge{join $;, sort @{$myhash{$key}}}, $key; }
Update: Use the corrected code below. Thanks, Adam. I'll leave the @{} out above for continuity.
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How to compare hash value (sort, join, hash)
by Adam (Vicar) on Apr 25, 2003 at 17:25 UTC |