Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Populating a CSV file with Text::CSV_XS

by BMaximus (Chaplain)
on Jan 26, 2006 at 22:31 UTC ( [id://525859]=note: print w/replies, xml ) Need Help??


in reply to Populating a CSV file with Text::CSV_XS

The docs say that it takes a reference to an array. So:
my @columns = (qw/what ever the items are for each columns/); $csv = Text::CSV_XS->new(); # $io is a filehandle from IO::File which has a print method. A glob d +oes not. $status = $csv->print($io, \@columns);
Use IO::File to make the filehandle. Not a glob as from what I understand the handle needs a print method in order for this to work.

BMaximus

Replies are listed 'Best First'.
Re^2: Populating a CSV file with Text::CSV_XS
by master_son (Acolyte) on Jan 27, 2006 at 16:41 UTC
    Thanks BMaximus, I actually used IO::File to write the csv, which looks easier.
    ---------------------
    Keep your concentration here and now where it belongs - Qui-Gon Jinn

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://525859]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-19 05:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found