Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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

by Marshall (Prior)
on Sep 30, 2012 at 10:12 UTC ( #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: $!";


Comment on Re^3: This looks like whitespace in my CSV but doesn't seem to be
Download Code
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
Node Status?
node history
Node Type: note [id://996492]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2014-07-26 11:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (176 votes), past polls