in reply to A different approach for bookmarks.

I really dont like
open FIL, "|uniq >$file";
how about opening the file as usual and on your while loop:
{ next if %uniq{$content}++; print FIL $content, "\n"; }