in reply to how to remove duplicate based on the first column value
use strict; use warnings; my %seen; while ( <DATA> ) { print unless $seen{(split /\|/)[0]}++; } __DATA__ 123|abc 123|cde 234|efg 456|hij
-enlil
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: how to remove duplicate based on the first column value
by EvdB (Deacon) on Jun 10, 2003 at 15:17 UTC | |
by revdiablo (Prior) on Jun 10, 2003 at 16:59 UTC |