you don't say if the repeated lines will be in succession(one right after the other) or if they can be spread out through the file. If it's random...then this is what i'd use....
my @lines=();
open (FILE,"$tempfile5") || die "Cannot read from $tempfile5\n";
my $found = 0;
while(<FILE>){
my $line_holder = $_; #DOH, should have had this here
foreach my $val(@lines){
if($val eq $line_holder){$found = 1;}
}
if($found){
$found = 0;
next;
}else{
push @lines, $line_holder;
}
}
TexasTess
"Great Spirits Often Encounter Violent Opposition From Mediocre Minds" --Albert Einstein