in reply to Re: CSV EOL Question
in thread CSV EOL Question

Thanks for the insight everyone! Tux, I attempted using your code with the scalar as a reference but the csv command is specifically looking for an array reference. Am I doing something wrong?
if($sth->execute) { while(my $dat = $sth->fetchrow) {$csv->print($fh, +$dat); }
Expected fields to be an array ref at ./name.pl line 65. I feel as though this will only work as \@dat.

Replies are listed 'Best First'.
Re^3: CSV EOL Question
by Tux (Canon) on Jan 22, 2014 at 18:28 UTC

    Yes, fetchrow returns a list, fetch is an alias to fetchrow_arrayref and returns a reference.


    Enjoy, Have FUN! H.Merijn