Help for this page

Select Code to Download


  1. or download this
    my $filename = '/path/to/file.csv';
    open (my $fh, '>', $filename) or die "Could not open $filename, $!";
    ...
    print $fh join(',', map($tags{$_} || 0, @headers) ) . "\n";
    
    close $fh;
    
  2. or download this
    use Tie::Array::CSV;
    my $filename = '/path/to/file.csv';
    ...
    push(@file,\@row);
    
    untie @file;