26967Counting the number of occurances of all paragraphs in a file
- Jul 20, 2010Hi,
I want to count the number of times every paragraph appears in a text file.
I want to print those paragraphs and the count of how many times they appeared if the count is more than 1.
It should print:
Appeared 2 times
Appeared 3 times.
and so on for all the paragraphs that appear more than once.
Let me know how can I do this Perl. I came across the split function but then that has to be used for every paragraphs and the text file can be very big as well to store in a single array.
Also many paragraphs will appear only once which are not to be considered.
Thanks in advance
[Non-text portions of this message have been removed]
- Next post in topic >>