Matching lines in a list?
Title says it all. I know I can do the perl (with lots of research and hard graft!) if I just know how to tackle the dilemma.
If I have a list:
I would split the list into an array so that they are now separate elements. Then, I want to check that if an element appears more than once in an array perl counts this and the program knows this but how can I do this...
Programming hurts the brain!
Title says it all. I know I can do the perl (with lots of research and hard graft!) if I just know how to tackle the dilemma.
If I have a list:
Code:
John
Eric
David
Paul
John
Eric
Harris
Eric
[\code]
and I want to print out:
[code]
John 2
David 1
Paul 1
Eric 3
Harris 1
I would split the list into an array so that they are now separate elements. Then, I want to check that if an element appears more than once in an array perl counts this and the program knows this but how can I do this...
Programming hurts the brain!