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


in reply to Re^2: 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

I don't work with multi-byte characters or UTF-8 files. But Perl has an amazing ability to deal with these things.

From the open() docs, it could be that all you need to do is open the file in the right encoding mode and that could enable even Perl 5.10.X to work. I don't know for sure, but this idea is worth a try.

open(my $fh, "<:encoding(UTF-8)", "filename") || die "can't open UTF-8 encoded filename: $!";

Replies are listed 'Best First'.
Re^4: This looks like whitespace in my CSV but doesn't seem to be
by ghenry (Vicar) on Sep 30, 2012 at 12:40 UTC

    Of course Marshall!!!

    That was it, all solved and s/^\s// works as I'd expect. Thanks so much. Very basic of me not to do.

    Walking the road to enlightenment... I found a penguin and a camel on the way.....
    Fancy a yourname@perl.me.uk? Just ask!!!