if (open my $fh, "<", $filename) { chomp (my $line = <$fh>); "$line\t" =~ m/^(?:[A-Za-z]\w*\t)+\z/ or die "Bad header in $filen +ame"; my ($fld1, @rest) = split m/\t/ => $line; $dbh->do ("create table $tablename (". (join "," => "$fls1 text", map { "$_ integer" } @rest).")"); }
Of course TIMTOWTDI
In reply to Re^3: DBI question
by Tux
in thread DBI question
by gogoglou
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |