$dbh->do('SET \@num := 0, \@id := -1;'); my $ar_results = $dbh->selectall_arrayref( qq( QUERY GOES HERE ), { Slice => {} });