CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
[Linux] Perl 5.12.3 -- parsing issue


New User

Dec 2, 2011, 8:55 AM

Post #1 of 1 (968 views)
[Linux] Perl 5.12.3 -- parsing issue Can't Post


This is a long time I've been on the forum to request enlightments concerning the use of Perl.

I'm writing a little script to parse .csv files in order to insert some parsed datas in a database.
Problem is that I encounter issue with the split function that won't split ^^
Unfortunately I'm frenchspeaking and I have accentuated characters in my parsed datas and I need to find a way to split it correctly.

When I try


The result is all but the expected, the string "Période:" is inserted in the wrong side of the split ^^
I tried with


It worked but I was forced to do three chops in a raw to delete the 'P', the 'é' and the newline character...

The character set of the .csv file is utf8 and I never found documentation concerning the fact that split() won't work with accentuated characters...

Is someone have an idea of how I could split the line from the file I'm reading correctly ?
I tried with regular expressions, but I'm not easy with and P.riode doesn't work, P*riode doesn't work and P.*riode won't meet my expectations too...

Thanks in advance !!


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives