Text::CSV::Auto::ExportTo::CSV - Export a CSV to a CSV.
use Text::CSV::Auto; use Text::CSV::Auto::ExportTo::CSV; my $auto = Text::CSV::Auto->new('path/to/file.csv'); my $exporter = Text::CSV::Auto::ExportTo::CSV->new( auto => $auto, file => 'path/to/new_file.csv', ); $exporter->export();
This module allows the exporting of a CSV to a new CSV.
The Text::CSV::Auto instance to copy headers and rows from. Required.
The file name to write the new CSV to. Required.
Set this to a hashref of extra options that you'd like to have passed down to the underlying Text::CSV writer.
Read the Text::CSV docs to see the many options that it supports.
This contains an instance of the Text::CSV object that is used to write the CSV file. You may pass in your own writer object. If you don't then one will be instantiated for you with the csv_options().
If not set already in csv_options, the following defaults will be used:
auto_diag => 1 # die() if there are any errors. sep_char => $auto->separator()
The character used for newlines. Defaults to "\n" which will produce a newline that is the default for your OS.
Exports the source CSV file to the destination CSV file.
Aran Clary Deltac <email@example.com>
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.