And I didn't get empty trailing lines...$ perl -i.bak -lne 's/\A\s+//; s/\s+\Z//; next unless $_ and not $seen +{$_}++; print' input.txt
In reply to Re^4: Duplicate lines with spaces, tabs...
by massa
in thread Duplicate lines with spaces, tabs...
by marto9
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |