Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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

by Marshall (Canon)
on Sep 30, 2012 at 10:12 UTC ( [id://996492]=note: print w/replies, xml ) Need Help??


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!!!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://996492]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-25 06:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found