in reply to Re: Unique with Text::CSV_XS
in thread Unique with Text::CSV_XS

For the OP's benefit, I'll make this explicit:

chomp; basically removes from $_ a terminating string equivalent to $\; chomp $foo; does the same, but to $foo rather than $_. See perldoc -f chomp.

However, you have no use for chomp here. You're getting "rows" of data which has been parsed for you and are now hashrefs, not strings!

Replies are listed 'Best First'.
Re^3: Unique with Text::CSV_XS
by Tux (Canon) on Jan 09, 2010 at 09:59 UTC

    Just for the record, $row is an arraref, not a hashref.

    $ echo 1,a | perl -MDP -MText::CSV_XS -wle'DPeek(Text::CSV_XS->new->ge +tline(*ARGV))' \AV() $ echo 1,a | perl -MDP -MText::CSV_XS -we'DDumper(Text::CSV_XS->new->g +etline(*ARGV))' $VAR1 = [ '1', 'a' ];

    Enjoy, Have FUN! H.Merijn