The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

merge_csv_files.pl - Command line client to Text::CSV::Merge

VERSION

version 0.05

Synopsis

    merge_csv_files.pl \
        --base=merge_into.csv \
        --merge=merge_from.csv \ 
        --columns=EMAIL,FNAME,LNAME,LOCATION,JAN,FEB,MAR,APR,MAY,JUN \
        --output=merge.csv \
        --search=EMAIL \
        --first-row-is-headers

Description

You have two CSV files with mostly the same column names. But, the 'base' CSV files has gaps in its data, i.e. some cells are empty. Another CSV has data, but its too laborious to comb through it by hand. Use this CLI to fill in the gaps.

Options

Required Options

base

The CSV file into which you want to merge data.

merge

The CSV file with which you want to fill in data gaps in base.

columns

A quoted, anonymous list of column names. Non-ASCII column names are as yet untested.

The column name by which you want to match up rows in base and merge.

Optional Options

output

Name of a file to which you want to direct the refined data. Default is merged.csv.

first-row-is-headers

Specify 1 or 0 (or do not specify at all) to designate the first row of both CSV files as column headings.

Default is 1, or TRUE (Remember, Perl has no built-in Boolean).

AUTHOR

Michael Gatto <mgatto@lisantra.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Michael Gatto.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.