my $rows = $sth_tss->fetchall_arrayref; # print Dumper $rows; $count = 0; print $CGI->p("rows is ", @{$rows}); for my $row ( @{$rows} ) { $CGI->p("Row", ++$count); my @fields = @{$row}; for my $field ( @fields ) { print $CGI->p($field); } }