in reply to [untitled node, ID 254219]

I would like to suggest you retrive all rows of query execute result for one time:
use DBI; . . . my $res = $sth->fetchall_arrayref(); # Returns array ref with all resu +lt rows which are array refs too. for my $row (@$res) { for my $value (@$row) { print "$value " } print "\n"; }
or
my $res = $sth->fetchall_arrayref({}); # Returns array ref with result + rows which are hash refs. for my $row (@$res) { for my $key (%$row) { print "$$row{$key} " } print "\n"; }
      
--------------------------------
SV* sv_bless(SV* sv, HV* stash);