Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Processing CSV File

by Perl3r (Initiate)
on Oct 03, 2012 at 23:21 UTC ( #997151=note: print w/replies, xml ) Need Help??

in reply to Re: Processing CSV File
in thread Processing CSV File

Thank you all, you have been extremely helpful!! I have found another problem, and that is with the CSV file.. The CSV will need to be a spreadsheet maintained in MS Excel.. The problem with that is, that when the CSV is saved in excel, it adds a hidden CR at the end of each line, so when the script runs, it fails after reading the first line.. Is it possible to amend the script above to ignore that CR?, or I am better off doing some pre processing to the CSV file to remove the CR? Thanks again!!

Replies are listed 'Best First'.
Re^2: Processing CSV File
by runrig (Abbot) on Oct 03, 2012 at 23:32 UTC
Re^2: Processing CSV File
by choroba (Chancellor) on Oct 04, 2012 at 07:54 UTC
    Instead of chomp, use s/\r\n//.
    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://997151]
[marto]: tutorials-> Subroutines may be of interest
[Corion]: A good morning to you too, marto!
[marto]: hey Corion, good weekend?
[prospect]: Thank you

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2017-07-24 08:02 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (348 votes). Check out past polls.