my %required_column = ( organization => [qw(0 1 2 4 6 7 8 12 15 16 17 18)], contact => [qw(0 1 2 3)], service => [qw(0 1 2 3 4 5 6 7 10 11 )], faq => [qw(0 1 2 3 5 )], literature => [qw(0 1 2 11 12 13)] ); sub sanity_check { my ($file, $column, $col_count) = @_; my $file = basename $file; $dcr_type = Gendcr::determine_dcr_type($file); if (not length($column)) { return if grep { $col_count eq $_ } @{$required_column{$dcr_type}}; } }