You can try this old trick:
# where @data is from flatfile
%seen = ();
@uniq = (); #will contain only unique elements
foreach $item(@data) {
unless($seen{$item}) {
$seen{$item} = 1;
if ($item =~ /\S+/g) {
push(@uniq,$item);
}
}
}
Greg
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
- eliminating duplicate lines in a file cherukuwada subrahmanyam
- Re: eliminating duplicate lines in a file Greg Meckes
- Re: eliminating duplicate lines in a file Sean O'Leary
- Re: eliminating duplicate lines in a file Paul
- Re: eliminating duplicate lines in a fil... M.W. Koskamp
- Re: eliminating duplicate lines in a... Casey West
- Re: eliminating duplicate lines ... M.W. Koskamp
- Re: eliminating duplicate l... Paul
- Re: eliminating duplica... Casey West
- Re: eliminating duplicate lines in a file Timothy Kimball
- Re: eliminating duplicate lines in a file cherukuwada subrahmanyam
