in reply to Using unix commands in perl?
my %seen; my @result = sort map { $seen{$_}++ ? () : $_ } @records;
You may need to pass a block to sort to make the sort more specific to your records.
If you really want to use the unix commands (say for speed), then you should investigate the use of the '|' modifier with the open built-in function.
-David
|
|---|