Text::CSV::SimpleSimpler parsing of CSV files | |
Download |
Text::CSV::Simple Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Tony Bowden
- Publisher web site:
- http://search.cpan.org/~sri/
Text::CSV::Simple Tags
Text::CSV::Simple Description
Simpler parsing of CSV files Text::CSV::Simple is a Perl module to simplify parsing of CSV files.SYNOPSIS my $parser = Text::CSV::Simple->new; my @data = $parser->read_file($datafile); print @$_ foreach @data; # Only want certain fields? my $parser = Text::CSV::Simple->new; $parser->want_fields(1, 2, 4, 8); my @data = $parser->read_file($datafile); # Map the fields to a hash? my $parser = Text::CSV::Simple->new; $parser->field_map(qw/id name null town/); my @data = $parser->read_file($datafile);Parsing CSV files is nasty. It seems so simple, but it usually isn't. Thankfully Text::CSV_XS takes care of most of that nastiness for us.Like many modules which have to deal with all manner of nastiness and edge cases, however, it can be clumsy to work with in the simple case.Thus this module.We simply provide a little wrapper around Text::CSV_XS to streamline the common case scenario. (Or at least my common case scenario; feel free to write your own wrapper if this one doesn't do what you want). Requirements: · Perl
Text::CSV::Simple Related Software