in reply to Re: Re: how to remove duplicate based on the first column value
in thread how to remove duplicate based on the first column value

Another nice perl command line switch is -n. This builds the while(<>) loop for you. Example:

perl -i.bak -ne 'print unless $s{(split /\|/)[0]}++' infile

Note: more of these can be found in perlrun.