Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Count and List Items in a Listby Tech77 (Novice) |
on Nov 01, 2005 at 14:53 UTC ( [id://504596]=perlquestion: print w/replies, xml ) | Need Help?? |
Tech77 has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks, I have just started using Perl at work to help out with tasks here and there so I am new to this. Recently, I created this script to grab a list of records from a database. It actually works! I'm pretty thrilled.
This gives me a list of all the entries in a column, but now I need to figure out how to use Perl to go through my new list, results.txt, and create a new list that holds the names and a count of how many times a partcular name appears on the list. For example, my list contains college and university names. Many of them appear multiple times. I'd like to create a list where each unique record appears only once but with a frequency count of how many times it appears. Can you offer some guidance on how to proceede? I'm not necessarily looking for finshed code, but more a point in the right direction so I can do it myself. Thank you.
Back to
Seekers of Perl Wisdom
|
|