#!/usr/bin/perl

# .pl - 

# Extract tsv files for merge
convfile("crc_20110815_assembly_certified_statewide.zip","sldl");
convfile("crc_20110815_congress_certified_statewide.zip","cd");
convfile("crc_20110815_senate_certified_statewide.zip","sldu");
system("redistmerge.pl cd.tsv.gz sldu.tsv.gz sldl.tsv.gz");

sub convfile {
    local($sf,$d)=@_;
    system("dbf2tsv.pl -H $sf|sort|gzip -c >$d.tsv.gz");
}
