in reply to Formatting a large number of records

Have you looked at XBase? From the pod:

This module can read and write XBase database files, known as dbf in dBase and FoxPro world. It also reads memo fields from the dbt and fpt files, if needed. An alpha code of reading index support for ndx, ntx, mdx, idx and cdx is available for testing -- see the DBD::Index(3) man page. Module XBase provides simple native interface to XBase files. For DBI compliant database access, see the DBD::XBase and DBI modules and their man pages.

It appears that something like:

use XBase; my ($file, $index) = ( '/path/to/foo.dbf', 0); my $table = XBase->new $file or die XBase->errstr; { local $\ = $record_sep; local $, = $field_sep; # or use a CSV module open my $outfile, '>', '/path/to/foo.txt' or die $!; do { my @foo = $table->get_record $index or die XBase->errstr; print $outfile @foo or die $!; } while $index++ < $table->last_record; close $outfile or die $!; } $table->close or die XBase->errstr;
You will probably want to refine that to check for deleted records, reorder fields, etc.

After Compline,
Zaxo