in reply to Re: Unique elements in array
in thread Unique elements in array

Ouch. chop is almost always wrong (what if your EOL marker is more than one character)--and what if $fld[0] is a valid value that evaluates to false in boolean context?

Replies are listed 'Best First'.
Re^3: Unique elements in array
by Moron (Curate) on May 10, 2007 at 09:55 UTC
    The popular misuse of chomp() deserves a new topic. As for $fld[0] - defined( unique{ $fld[0] } ) will be true in the case you cite.

    There might be functional issues or data quality issues in any real example but these are in general OT.

    __________________________________________________________________________________

    ^M Free your mind!