in reply to finding and deleting repeated lines in a file
my ($line, %hash); while ($line = <FILE>) { if ($line =~ /(your_sequence_format)/) { if (! exists($hash{$1})) { $hash{$1} = $line; } } } # now you can print the hash back to your file
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: finding and deleting repeated lines in a file
by marvell (Pilgrim) on Jun 19, 2002 at 14:43 UTC | |
by hotshot (Prior) on Jun 19, 2002 at 14:52 UTC |