Skip to main content
added 5 characters in body
Source Link
jubilatious1
  • 3.9k
  • 10
  • 21

Using Raku (formerly known as Perl_6)

~$ raku -ne 'BEGIN my %dup; .put unless %dup{$_}++;'  input_file > output_file

OR:

~$ raku -e '.put for lines.unique;'  input_file > output_file

[ Note: compare first answer here with excellent Perl answer by @Mat ].

https://docs.raku.org
https://raku.org

Using Raku (formerly known as Perl_6)

~$ raku -ne 'BEGIN my %dup; .put unless %dup{$_}++;'  input_file > output_file

OR:

~$ raku -e '.put for lines.unique;'  input_file > output_file

[ Note: compare first answer with excellent Perl answer by @Mat ].

https://docs.raku.org
https://raku.org

Using Raku (formerly known as Perl_6)

~$ raku -ne 'BEGIN my %dup; .put unless %dup{$_}++;'  input_file > output_file

OR:

~$ raku -e '.put for lines.unique;'  input_file > output_file

[ Note: compare first answer here with excellent Perl answer by @Mat ].

https://docs.raku.org
https://raku.org

Source Link
jubilatious1
  • 3.9k
  • 10
  • 21

Using Raku (formerly known as Perl_6)

~$ raku -ne 'BEGIN my %dup; .put unless %dup{$_}++;'  input_file > output_file

OR:

~$ raku -e '.put for lines.unique;'  input_file > output_file

[ Note: compare first answer with excellent Perl answer by @Mat ].

https://docs.raku.org
https://raku.org