in reply to Re: Remove Duplicates from one text file and print them in another text file.
in thread Remove Duplicates from one text file and print them in another text file.

I am working on .NET 4.0 and Windows 7 is my OS. The code threw an error. Probably this is for Unix/Linux OS. Please correct me if I am wrong. Backslash found where operator expected at C:\Programs\CPGD\PerlScripts\remdup1.pl line 4, near "Users\" Backslash found where operator expected at C:\Programs\CPGD\PerlScripts\remdup1.pl line 4, near "spullabhotla\" Backslash found where operator expected at C:\Programs\CPGD\PerlScripts\remd up1.pl line 4, near "Desktop\" syntax error at C:\Programs\CPGD\PerlScripts\remd\remdup1.pl line 4, near "sort C :" Execution of C:\Perl64\Perl Programs\Learning\remdup1.pl aborted due to compilation errors.

  • Comment on Re^2: Remove Duplicates from one text file and print them in another text file.

Replies are listed 'Best First'.
Re^3: Remove Duplicates from one text file and print them in another text file.
by bedohave9 (Acolyte) on Jun 05, 2012 at 17:09 UTC

    I am working on .NET 4.0 and Windows 7 is my OS. The code threw an error. Probably this is for Unix/Linux OS. Please correct me if I am wrong.

    Backslash found where operator expected at C:\Programs\CPGD\PerlScript +s\remdup1.pl line 4, near "Users\" Backslash found where operator exp +ected at C:\Programs\CPGD\PerlScripts\remdup1.pl line 4, near "spulla +bhotla\" Backslash found where operator expected at C:\Programs\CPGD\ +PerlScripts\remd up1.pl line 4, near "Desktop\" syntax error at C:\Pr +ograms\CPGD\PerlScripts\remd\remdup1.pl line 4, near "sort C :" Execu +tion of C:\Perl64\Perl Programs\Learning\remdup1.pl aborted due to co +mpilation errors.
Re^3: Remove Duplicates from one text file and print them in another text file.
by aaron_baugher (Curate) on Jun 06, 2012 at 17:46 UTC

    Yes, utilities like sort and uniq are available in Unix/Linux operating systems. On Windows, you can install a package called Cygwin, which will give you a Unix-like environment and command line, plus those common utilities.

    Aaron B.
    Available for small or large Perl jobs; see my home node.

      There is also GnuWin32, a set of GNU utilities compied as native Windows executables (no MinGW, no CygWin).

      (Update:) And of course, GNU Utilities for Win32, old but good, just extract the ZIP file somewhere, add the directory to $ENV{PATH}, and you are done. This is what I use on Windows.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)