in reply to Delete Duplicate Entry in a text file

Assuming you've opened $fh for reading on your fail.txt file or whatever, it should be about as easy as....

my $last; while (my $line = <$fh>) { next if defined $last and $line eq $last; print $line; $last = $line; }
You'll have to modify it a bit for those blank lines, if they really appear in your log files.

Edit: added my $line = to while loop.

"My two cents aren't worth a dime.";