Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: How to find number of unique elemenst in array

by GrandFather (Saint)
on Nov 27, 2008 at 20:20 UTC ( [id://726475]=note: print w/replies, xml ) Need Help??


in reply to How to find number of unique elemenst in array

Life is too short to spend it reinventing wheels - use CPAN. In this case the various List modules will likely have what you need. Enjoy.


Perl's payment curve coincides with its learning curve.
  • Comment on Re: How to find number of unique elemenst in array

Replies are listed 'Best First'.
Re^2: How to find number of unique elemenst in array
by ysth (Canon) on Nov 27, 2008 at 20:37 UTC
    Counting repeated elements isn't exactly reinventing a wheel. What List modules/functions did you have in mind? (My List::Util::reduce solution was by way of a joke; I hadn't seen your post when I wrote it.)

      Oh ysth! Look at the OP's sig, then look again at my reply. ;)

      Although actually List::Uniq would seem to fit quite well.


      Perl's payment curve coincides with its learning curve.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://726475]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-24 23:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found