App-CSV

 view release on metacpan or  search on metacpan

bin/csv  view on Meta::CPAN


CSV (comma-separated value) files are the lowest common denominator of
structured data interchange formats. For such a humble file format, it
is pretty difficult to get right: embedded quote marks and linebreaks,
slipshod delimiters, and no One True Validity Test make CSV data found
in the wild hard to parse correctly. L<Text::CSV_XS> provides flexible
and performant access to CSV files from Perl, but is cumbersome to use
in one-liners and the command line.

B<csv> is intended to make commandline processing of CSV files as easy
as plain text is meant to be on Unix. Internally, it holds two L<Text::CSV>
objects (for input and for output), which have reasonable defaults but
which you can reconfigure to suit your needs. Then you can extract just
the fields you want, change the delimiter, clean up the data etc.

In the simplest usage, B<csv> filters stdio and takes a list of integers.
These are 1-based column numbers to select from the input CSV stream.
Negative numbers are counted from the line end. Without any column list,
B<csv> selects all columns (this is still useful to normalize quoting
style etc.).



( run in 1.891 second using v1.01-cache-2.11-cpan-64ef6c95b5d )