you can also do something like this
my $tables = join (',',@tables_to_drop;)
and use it in the drop statement $dbh->do("DROP TABLE $tables;") or die dbh->errstr;
I am assuming your SQL engine allows multiple table drops when they separated by commas. It works for me in MySQL
Also note that using the $variable inside the query is sometimes considered to be dangerous esp if it is a user input. http://www.perl.com/pub/a/1999/10/DBI.html
cheers
SK
In reply to Re^2: SQL with DBI
by sk
in thread SQL with DBI
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |