By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,250 Members | 1,270 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,250 IT Pros & Developers. It's quick & easy.

CSV decoding through perl

P: 2
I am decoding the csv file with the split command but my problem is I am having some field which are in double quotes and the values inside that are having comma, which is resulting the single field is getting divided into two.

Please can some one help me
Feb 20 '08 #1
Share this Question
Share on Google+
4 Replies


KevinADC
Expert 2.5K+
P: 4,059
The easiest thing would be to use the Text::CSV or better still Text::CSV_XS modules as they know how to handle the data thats in the double-quotes. They might have to be installed though because they are not core modules, even though they should be IMHO.
Feb 20 '08 #2

eWish
Expert 100+
P: 971
tspatil,

I deleted the other post you made regarding the same issue. Please do not double post your questions.

Thank You,

Moderator
Feb 20 '08 #3

P: 2
The easiest thing would be to use the Text::CSV or better still Text::CSV_XS modules as they know how to handle the data thats in the double-quotes. They might have to be installed though because they are not core modules, even though they should be IMHO.
Hi KevinADC,

Please can you help me how to do this.

I am new to perl scripting.

Thanks
Feb 21 '08 #4

eWish
Expert 100+
P: 971
CPAN is where you can find the modules that Kevin listed. Read the documentation and look through the examples given. Then give them a try and if you still have problems, post the code that you have tried and we will try to help. Please don't just copy and paste the sample code and expect results. The documentations is the key.

It is all up to you now.

--Kevin
Feb 21 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.