my @tables_to_drop = qw(Grab_Addr2 Grab_MCC1 Grab_MCC2); foreach my $table (@tables_to_drop) { $dbh->do("DROP TABLE $table;") or die $dbh->errstr(); }