my $ref; while($ref = $sth->fetchrow_arrayref) { print join (", ", @{$ref}), "\n"; }