you will see how:perl -MO=Deparse -ne 'print unless $n{$_}++' my_file.txt
You can remove the LINE: label and you should add use strict.LINE: while (defined($_ = <ARGV>)) { print $_ unless $n{$_}++; }
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to (jeffa) 3Re: Removing Duplicate Lines from a File
by jeffa
in thread Removing Duplicate Lines from a File
by johnirl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |