http://www.perlmonks.org?node_id=916789


in reply to Re^2: Tie'ing a dbh result set?
in thread Tie'ing a dbh result set?

If you can guarantee that the array will only be accessed:

then you can do it by simply writing a FETCH which returns the next resultset and a FETCHSIZE which returns the correct size. It would work correctly for usage like:
foreach my $result_ref (@array) { process($result_ref); }

Otherwise, please explain how you make it function as an iterator.