I think there might be a couple of problems with your code.
The grep solutions suggested might be better if line order is to be preserved. Something like (again, not tested).
... my %seen = (); print grep ! $seen{ $_ } ++, <$fh>; ...
Cheers,
JohnGG
In reply to Re^2: finding unique items in an array, from a text file
by johngg
in thread finding unique items in an array, from a text file
by spazmospazmo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |