Text::CSV

Comma-separated values manipulator (using XS or PurePerl)
Download

Text::CSV Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Makamaka Hannyaharamitu
  • Publisher web site:
  • http://search.cpan.org/~makamaka/

Text::CSV Tags


Text::CSV Description

Comma-separated values manipulator (using XS or PurePerl) Text::CSV is a Perl module that provides facilities for the composition and decomposition of comma-separated values using Text::CSV_XS or its pure Perl version.An instance of the Text::CSV class can combine fields into a CSV string and parse a CSV string into fields.The module accepts either strings or files as input and can utilize any user-specified characters as delimiters, separators, and escapes so it is perhaps better called ASV (anything separated values) rather than just CSV.SYNOPSIS use Text::CSV; $csv = Text::CSV->new(); # create a new object # If you want to handle non-ascii char. $csv = Text::CSV->new({binary => 1}); $status = $csv->combine(@columns); # combine columns into a string $line = $csv->string(); # get the combined string $status = $csv->parse($line); # parse a CSV string into fields @columns = $csv->fields(); # get the parsed fields $status = $csv->status (); # get the most recent status $bad_argument = $csv->error_input (); # get the most recent bad argument $diag = $csv->error_diag (); # if an error occured, explains WHY $status = $csv->print ($io, $colref); # Write an array of fields # immediately to a file $io $colref = $csv->getline ($io); # Read a line from file $io, # parse it and return an array # ref of fields $csv->column_names (@names); # Set column names for getline_hr () $ref = $csv->getline_hr ($io); # getline (), but returns a hashref $eof = $csv->eof (); # Indicate if last parse or # getline () hit End Of File $csv->types(@t_array); # Set column types Requirements: · Perl


Text::CSV Related Software