The stupid question is the question not asked | |
PerlMonks |
Re: Find unique elements in an arrayby dragonchild (Archbishop) |
on Apr 05, 2004 at 03:14 UTC ( [id://342560]=note: print w/replies, xml ) | Need Help?? |
My personal unique'ing function is:
The reason to use values is that I need to get the unique set from an array of objects, not scalars. (This assumes, of course, that every object has a unique stringification. As I don't overload stringification in my objects, this works. If you do overload stringification ... good luck. Seriously.) And, the reason for not using references is that I use this function as so:
------
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
In Section
Cool Uses for Perl
|
|