Don't ask to ask, just ask | |
PerlMonks |
Re: extracting redundant and unique itemsby AssFace (Pilgrim) |
on May 14, 2003 at 16:18 UTC ( [id://258146]=note: print w/replies, xml ) | Need Help?? |
I'm sure there has to be a better way to do it than the way I have here, but one way would be to iterate over that array and putting each spot into a hash as the key. Then once that is done, you can get the array of the keys of that hash and you have your unique values.
Like I said, that is ugly and probably wasteful - but it is the first thing that popped into my head. Here is some totally untested code:
------------------------------------------------------------------- There are some odd things afoot now, in the Villa Straylight.
In Section
Seekers of Perl Wisdom
|
|