http://www.perlmonks.org?node_id=447834


in reply to accessing data in DBI object

It helps us help you if you can say what's not working, e.g. what error message is perl giving you when you try to execute the code. That said, there are a couple of things that jumped out at me:

(Also, what you probably meant to write ( @{$DataOut->fetchrow_array} ) won't work either, because fetchrow_array returns the row's data as an array.

So the following loop rewrite should help you get over the two problems I've mentioned:

while ( my @row = $DataOut->fetchrow_array ) { my $fname = $row[0]; # ... }

An even better solution, IMO, would be to use fetchrow_hashref so the columns have readable names and you don't have to go back to the SQL to figure out which column maps onto which variable.

HTH

If not P, what? Q maybe?
"Sidney Morgenbesser"