![]() |
|
There's more than one way to do things | |
PerlMonks |
Re: Re: Unique array w/o repeated elements and still keep the original order!by jynx (Priest) |
on Aug 09, 2002 at 20:17 UTC ( #189027=note: print w/replies, xml ) | Need Help?? |
That won't work how you expect it to... Particularly, what's happening to $_? It's getting set by the while loop and then forgotten about, which is to say that you'll not process all of the lines. Oops. How about this: Or alternately you could check for file EOF in the while condition like so: Either way should fix the problem... jynx
In Section
Seekers of Perl Wisdom
|
|