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.


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