reez has asked for the wisdom of the Perl Monks concerning the following question:
Hello PerlMonks
I have problem with using Text::CSV, just don`t understand routines. I have 3 tables @list, @val1, @val2, I need to create CSV file with content like this pattern:
filename(which is always the same);$list[0];$val1[0];$val2[0]; filename;$list[n];$val1[n];$val2[n];
this is part of a bigger script, this is just concerning cut:
my $csv = Text::CSV->new({sep_char => ';'}); open (CSV, ">", "base.csv") or die $!; if ($csv->combine(@list)){ print CSV $csv->string "\n"; } else { print "combine () failed on argument: ", $csv->error_input, "\n"; }
I wanted to add to such existing file next arrays, but above itself is not working properly, printing all array to one field.How to refer to specific columnd and row in creating csv.Don`t understand documentation for this module. Thanks in advance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Creating CSV file
by roboticus (Chancellor) on Jul 31, 2010 at 15:13 UTC | |
by reez (Novice) on Jul 31, 2010 at 16:29 UTC | |
by GrandFather (Saint) on Jul 31, 2010 at 23:00 UTC | |
by Tux (Canon) on Aug 01, 2010 at 08:13 UTC | |
by GrandFather (Saint) on Aug 01, 2010 at 12:15 UTC | |
| |
by graff (Chancellor) on Jul 31, 2010 at 22:56 UTC | |
|
Re: Creating CSV file
by Anonymous Monk on Jul 31, 2010 at 15:01 UTC |