http://qs1969.pair.com?node_id=996472

ghenry has asked for the wisdom of the Perl Monks concerning the following question:

Dear all,

I have the following in CSV:

"My Company","Gavin","Henry ","ghenry@ghenry.co.uk"," 1.00"

I have:

my $csv = Text::CSV_XS->new( { binary => 1, eol => $/ } ); open my $io, '<', $file or die "$file: $!"; while ( my $row = $csv->getline($io) ) { my @fields = @$row; next unless $fields[4]; $fields[4] =~ s/\s+//g; print $fields[4], "\n"; }

This looks like whitespace but is never removed. What am I missing? This is soo basic it's driving me mental!

Thanks.

Walking the road to enlightenment... I found a penguin and a camel on the way.....