Help for this page

Select Code to Download


  1. or download this
    # Takes an array and returns it as a CSV row
    sub format_csv {
    ...
      }
      (join ",", @fields) . "\n";
    }
    
  2. or download this
    local *FILE;
    open (FILE, "> $file") or die "Cannot write '$file': $!";
    ...
      print FILE format_csv(@$row{@cols});
    }
    close(FILE) or die "Cannot close '$file': $!";