Do you know where your variables are? | |
PerlMonks |
Re: Removing repeated lines from fileby diotalevi (Canon) |
on Jun 24, 2003 at 11:45 UTC ( [id://268460]=note: print w/replies, xml ) | Need Help?? |
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 = $_'
In Section
Seekers of Perl Wisdom
|
|