in reply to Re^2: Fetch data from DB and put in to Table Tk
in thread Fetch data from DB and put in to Table Tk

Please kindly help me.

Please print out what your @name and $row is, as it comes out of the db. You have a simple dereferencing problem, where what comes out of the db is not exactly what you think. Post it so we can see the result and can help dereferencing. Notice, you are using fetchrow_arrayref, so you might want to look at the values of @$row, instead of $row.

Another alternative would be to use fetchrow_array instead.

my @name; my @name1; while (my $row = $sh2->fetchrow_arrayref) { push @name, $row; push @name1, @$row; } # look at the difference print "@name\n"; print "@name1\n";

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh