in reply to Re: Duplicate lines with spaces, tabs...
in thread Duplicate lines with spaces, tabs...

When I run your code with pjotriks changes I see no blank line at the end of the result file

  • Comment on Re^2: Duplicate lines with spaces, tabs...

Replies are listed 'Best First'.
Re^3: Duplicate lines with spaces, tabs...
by marto9 (Beadle) on Jul 17, 2008 at 13:56 UTC
    Maybe you didn't copy the entire example, including the blank lines. This is my result.
    5 6 55 66
    Apparantly perlmonks.org doesn't show blank lines. But after '66' I get a new blank line.
      I used:
      $ perl -i.bak -lne 's/\A\s+//; s/\s+\Z//; next unless $_ and not $seen +{$_}++; print' input.txt
      And I didn't get empty trailing lines...
      []s, HTH, Massa
      Nvm. The problem isn't that big. I wish to thank everyone that helped me. ;)