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 ].