print map "$_\n", @{$sth->{NAME}}; print "\n"; while (my $arrayref = $sth->fetchrow_arrayref) { print "\n"; print map "$_\n", map +(defined($_) ? $_ : 'NULL'), @$arrayref; print "\n"; }