in reply to A large table with DBI

I'd do like jZed but I think this is a good opportunity to use map:

my $table_def = join ',', map { "INT column$_" } @columns; $dbh->do("CREATE TABLE my_table ($table_def)");

update: thanks to davidrw for the correction

Replies are listed 'Best First'.
Re^2: A large table with DBI
by davidrw (Prior) on Feb 10, 2006 at 22:56 UTC
    join ',' instead of join '' (but y, i like not repeating "int" too)