in reply to Re: Reading a MySQL table into an array
in thread Reading a MySQL table into an array

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"; }
If this is the exact same code you're using it would seem that you only get one entry because you don't update $i++.

Replies are listed 'Best First'.
Re^3: Reading a MySQL table into an array
by davies (Monsignor) on Jul 30, 2005 at 15:41 UTC
    Sorry - I was trying to cut my code down to the minimum & cut too much! I'll check this out (as I said in another reply, my intention is to understand), but I have deleted some of my code after following RNahi's advice and getting a working solution.

    Regards,

    John Davies