That is certainly != to what I wrote....
Exactly the point. In your code, each iteration of the loop assigns the next row to $_ (your while statement), then assigns the following line to $line_holder. The line assigned to $_ is never handled, so it just get's "skipped."
In any case, couldn't the whole process be reduced to
my %seen = () ; my @uniq_rows = grep { !$seen{$_}++ } <FILE> ;
?
Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.
--Friedrich Nietzsche
In reply to Re: Re: Re: Re: Unique array w/o repeated elements and still keep the original order!
by DamnDirtyApe
in thread Unique array w/o repeated elements and still keep the original order!
by chuleto1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |