use SQL; my @tables; my $temp; SQL::Connect "debloat", "localhost"; SQL::xqt "SHOW TABLES"; my $i = 0; while ($temp = $SQL::sth->fetchrow_arrayref){ $tables[$i] = $$temp[$i]; } foreach (@tables) { print "$_\n"; }