use strict; use warnings; my %seen; while ( <DATA> ) { print unless $seen{(split /\|/)[0]}++; } __DATA__ 123|abc 123|cde 234|efg 456|hij
-enlil
In reply to Re: how to remove duplicate based on the first column value
by Enlil
in thread how to remove duplicate based on the first column value
by tariqahsan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |