Datafile::Array - README

Datafile::Array is a lightweight pure-Perl module for handling tabular/delimited data files.

It provides:

Perl License

Installation

perl Makefile.PL
make
make test
make install

Modules

Datafile::Array

Handles reading and writing delimited data files with optional CSV quoting, headers, and prefix lines.

SYNOPSIS

use Datafile::Array qw(readarray writearray parse_csv_line);

my @records;
my @fields;

my ($count, $msgs) = readarray('data.txt', \@records, \@fields, {
    delimiter    => ';',
    csvquotes    => 1,        # full CSV support with multi-line
    has_headers  => 1,
    prefix       => 1,        # H/R prefix mode
    trim_values  => 1,
    verbose      => 1,
});

writearray('data.txt', \@records, \@fields, {
    header  => 1,
    prefix  => 1,
    backup  => 1,
    comment => 'Exported on ' . scalar localtime,
});

# Standalone CSV parsing
my @parts = parse_csv_line('a,"b,c","d""e"', ',');

FUNCTIONS

KEY OPTIONS

Common Features

The module:

License

This module is free software. You can redistribute it and/or modify it under the same terms as Perl itself.

See the official Perl licensing terms: https://dev.perl.org/licenses/