in reply to Unique array w/o repeated elements and still keep the original order!
Tiagoforeach my $instance (@lines2) { print OUTF $instance unless $hsh{$instance}++; }
Update: replaced 'if' with 'unless'. thanks robobunny
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Unique array w/o repeated elements and still keep the original order!
by robobunny (Friar) on Aug 09, 2002 at 19:50 UTC |
In Section
Seekers of Perl Wisdom