|
I need some help! 1. I open a CSV file and parse it. If it does not exist I
create it. Immediately after the
program runs, when I try to open the csv file with
MS-Excel, it gives error in reading. I am working on a windows box. Here is the code: my $csv = Text::CSV_XS->new({ 'sep_char' => $sep_char }), $filepath = 'c:/example.csv'; open(my $fh, ">>$filepath") or die "Could not
open file - $filepath - $!"; while (<$fh>) { my $line = $_; $csv->parse($line); my @fields = $csv->fields(); for $column (@fields) { print " =>
$column\n"; } } close($fh); Another thing: How do I write and or append to the
file in CSV format, an array of values to a specific column - Do I have to rewrite
the whole file or just select a specific column and append. I don’t know
how to do the second part? I appreciate any help Thanks |
_______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
