in reply to Re: Unique array w/o repeated elements and still keep the original order!
in thread Unique array w/o repeated elements and still keep the original order!

i'm assuming it was just a typo, but i think you meant:
foreach my $instance (@lines2) { print OUTF $instance unless $hsh{$instance}++; }
as written, it will only print the duplicates.
  • Comment on Re: Re: Unique array w/o repeated elements and still keep the original order!
  • Download Code