use Data::Dumper; my $ref = $sth->fetchall_arrayref(); print Data::Dumper->Dump([$ref], ['*ref']);