Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

TEXT TO CSV

by Anonymous Monk
on Jun 28, 2013 at 11:09 UTC ( #1041218=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

how to convert a text file to csv file

Comment on TEXT TO CSV
Re: TEXT TO CSV
by tobyink (Abbot) on Jun 28, 2013 at 11:12 UTC
    while (<>) { chomp; s/"/""/g; print qq["$_",\n]; }
    package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
Re: TEXT TO CSV
by Tux (Monsignor) on Jun 28, 2013 at 11:13 UTC

    You are being too vague here.

    • What is the format of the text?
    • Did you search this site for a solution?
    • What have you tried so far?
    • Did you trie readinbg the documentation for Text::CSV and/or Text::CSV_XS already?

    Enjoy, Have FUN! H.Merijn
      hey I saw the code , actually I am new to perl . so from what I see that it is for csv to text , nor the other war around

        the other war around

        Don't mention the war!

        But please do check out Text::CSV which allows you to read and write CSV files.
        ... as brother Tux's pointed out.

        Cheers, Sören

        (hooked on the Perl Programming language)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2014-09-03 08:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (35 votes), past polls