Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
SCENERIO:- We have a huge list of log files (about 50k). I am trying to create a user list for each url.
MY PROBLEM:- How do I remove duplicates values (not keys) in a hash like this. @{$is{$a}}
MY IDEA:- I have already tried using this. @{$is{$a}} = grep {! $temp{$_}++ } @{$is{$a}};
THE PROBLEM:-The problem with the above is that, while it does seem to work for a lot of key value pairs, I found some of the values sneek in duplicate values.
I am running out of ideas about what to do here. Please give me any suggestions.
Thank you
Edit: g0n - code tags & formatting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: remove duplicates
by ayrnieu (Beadle) on Mar 11, 2006 at 07:07 UTC | |
|
Re: remove duplicates
by Corion (Patriarch) on Mar 11, 2006 at 07:10 UTC | |
by Anonymous Monk on Mar 11, 2006 at 23:12 UTC | |
by Corion (Patriarch) on Mar 12, 2006 at 15:52 UTC |