in reply to Re^3: Duplicate lines with spaces, tabs...in thread Duplicate lines with spaces, tabs...
$ perl -i.bak -lne 's/\A\s+//; s/\s+\Z//; next unless $_ and not $seen +{$_}++; print' input.txt [download]