The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

Changes for version 1.51 - 2007-12-12

  • 1. Add a class methods Data::Table::fromFile(file_name), which can guess the file format and call fromCSV/fromTSV internally.
  • fromFile relies on the following new methods fromFileGuessOS(file_name) fromFileGetFirstLine($file_name, $OS) fromFileIsHeader($string) fromFileGuessDelimiter($string) to figure out if the input file is from UNIX/PC/MAC, whether its first row contains column headers, and whether it uses ",", "\t" or ":" as field delimiters. It then calls either fromCSV or fromTSV to return the table object.
  • $t = Data::Table::fromFile("myFileName_CSVorTSV_HeaderOrNoHeader_UNIXorPCorMAC");
  • Please refers to the updated document for details.
  • 2. When fromFile/fromCSV/fromTSV reads from an empty file, it returns an undef object, rather than quit.
  • 3. Provide more informative error message, when invalid column header is found.

Modules

Data type related to database tables, spreadsheets, CSV/TSV files, HTML table displays, etc.