in reply to Shorten a list...
Prints...use warnings; use strict; my %groups; while (<DATA>) { next unless /\S/; chomp; $groups{$_}++; } for (sort keys %groups) { print "$_\n" if $groups{$_} > 1; } __DATA__ Group 1 Group 2 Group 3 Group 3 Group 4 Group 5 Group 5 Group 5
Group 3 Group 5
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Shorten a list...
by la (Novice) on Oct 16, 2011 at 00:18 UTC | |
by toolic (Bishop) on Oct 16, 2011 at 00:42 UTC |