go ahead... be a heretic | |
PerlMonks |
Re: Problems with looping through an arrayby gmax (Abbot) |
on May 27, 2004 at 10:34 UTC ( [id://356855]=note: print w/replies, xml ) | Need Help?? |
Use a hash to get a count of each unique item.
(update) Instead of Data::Dumper, you could also get your details this way:
See also Perl Idioms Explained - keys %{{map{$_=>1}@list}} in Tutorials to see how the hash mechanism works. As for the error in your code, this node could be of help. _ _ _ _ (_|| | |(_|>< _|
In Section
Seekers of Perl Wisdom
|
|