Re: Print an array without the duplicate

2004-11-18 Thread Ing. Branislav Gerzo
Li, Aiguo (NIH/NCI) [LA], on Thursday, November 18, 2004 at 11:24 (-0500) contributed this to our collective wisdom: LA> I need to print a header line without duplicated item and am struglling with my %seen = (); my @uniqu = grep { ! $seen{$_} ++ } @header; -- ...m8s, cu l8r, Brano. ["The Na

Re: Print an array without the duplicate

2004-11-18 Thread Steve Bertrand
> > Hi, all. > > I need to print a header line without duplicated item and am > struglling with > the elimination of replicated items. The following codes are nor > working > yet. Could anyone help me to make this work? As someone pointed me to: perldoc -q duplicate HTH, Steve > > #!usr/bin

Print an array without the duplicate

2004-11-18 Thread Li, Aiguo (NIH/NCI)
Hi, all. I need to print a header line without duplicated item and am struglling with the elimination of replicated items. The following codes are nor working yet. Could anyone help me to make this work? #!usr/bin/perl use strict; use warnings; my @header; my $i ; my $size = @header; while