Hello, I have a list of data that are in the format:
Group 1
Group 2
Group 3
Group 3
Group 4
Group 5
Group 5
Group 5
I need to write a perl script that returns only list of the groups with more than one entry (eg. I would want to shorten this list to only include Group 3 and Group 5's entries).
COuld any one give me some suggestions on how to do this? It is the "group has more than 1 line" part below that I am having trouble writing. Eg.
if(/^\Group\s+(\d+)/){ if(group has more than one line){ print group lines }}
THanks!
In reply to Shorten a list... by la
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |