in reply to Removing repeated lines from file

This is a one-liner. If you add in the '-ibck' flag then you can modify the file directly.

perl -ne 'next if $prev eq $_; print; $prev = $_'