Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

user input comma in csv

by MynameisAchint (Novice)
on Jun 24, 2013 at 06:40 UTC ( [id://1040380]=perlquestion: print w/replies, xml ) Need Help??

MynameisAchint has asked for the wisdom of the Perl Monks concerning the following question:

Hey monks

I am working on a csv file , and my logic includes splitting the csv file with , but when user in a csv file gives a comma , it causes issues . My question is that is there any way to distinguish a user input comma from the comma delimiter of csv file .

I have seen that whenever we have an user input comma , delimiter changes to " .

Replies are listed 'Best First'.
Re: user input comma in csv
by kcott (Archbishop) on Jun 24, 2013 at 07:08 UTC

    G'day MynameisAchint,

    "I am working on a csv file , and my logic includes splitting the csv file with , but when user in a csv file gives a comma , it causes issues . My question is that is there any way to distinguish a user input comma from the comma delimiter of csv file ."

    That looks an awful lot like CSV SPLIT:

    "I am working on csv file , viewing as excel . so i am splitting it by comma for formatting . but the problem is when the data itself has comma in it . is there any way to overcome the effect of this comma"

    And the homework(?) you'll be handing in will look like the code in txt to csv once you've sorted out the constructor attributes.

    I suggest you (MynameisAchint) contact serene_monk and torres09; as you all appear to be working on exactly the same homework(?) task. Furthermore, as you're all in the same timezone, collaboration should be easy. :-)

    -- Ken

Re: user input comma in csv
by Tux (Canon) on Jun 24, 2013 at 06:47 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1040380]
Approved by Happy-the-monk
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2026-03-06 20:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.