s/TRUE/1/imgsx;
s/FALSE/0/imgsx;
####
tr/TRUEFALSE/111100000/;
####
open my $Q_FH, '>', \my $query;
####
#create customer DB
print $Q_FH "INSERT INTO CUSOMER
(customer_id, company_name)\n";
print $Q_FH "VALUES";
print $Q_FH join(',', map{"\n($cust_id_href->{$_}, $_)"} keys %$cust_id_href);
print $Q_FH ";\n";
#create vendor DB
print $Q_FH "INSERT INTO VENDOR (vendor_id, company_name)\n";
print $Q_FH "VALUES";
print $Q_FH join(',', map{"\n($vendor_id_href->{$_}, $_)"} keys %$vendor_id_href);
print $Q_FH ";\n";
####
sub table_to_array {
my $table_fh = shift;
my $table_aref = ();
foreach (<$table_fh>){
push @{$table_aref}, $_ if $_;
}
#@{$table_aref} = <$table_fh>;
return $table_aref;
}
Use of uninitialized value in lc at /usr/local/lib/perl5/site_perl/5.12.3/Tie/Handle/CSV/Hash.pm line 31, <$csv_fh> line 8014