http://www.perlmonks.org?node_id=996478


in reply to Re: This looks like whitespace in my CSV but doesn't seem to be
in thread This looks like whitespace in my CSV but doesn't seem to be

That gives me:

[ "My Company", "Gavin", "Henry\xC2\xA0", "ghenry\@ghenry.co.uk", "\xC2\xA1.00", ]

which isn't whitespace after all. Thanks for the Data::Dump tip. I've always used Data::Dumper. Swapping for that produces:

$VAR1 = [ 'My Company', 'Gavin', 'Henry ', 'ghenry@ghenry.co.uk', ' 1.00' ]; $VAR1 = [ 'My Company', 'Gavin', 'Henry ', 'ghenry@ghenry.co.uk', ' 1.00' ];

i.e.

next unless $fields[4]; print Dumper \@fields; $fields[4] =~ s/\s+//g; print Dumper \@fields;
Walking the road to enlightenment... I found a penguin and a camel on the way.....
Fancy a yourname@perl.me.uk? Just ask!!!