my $ref = $sth->fetchall_arrayref(); foreach my $inner (@$ref){ print join ("\t", @$inner), "\n"; }