in reply to
Re^3: Tie'ing a dbh result set? (unknown size)
in thread Tie'ing a dbh result set?
One teeny tiny problem with that.. if the size of the Tie'd array is say a maximum of 5000 entries, the 5001st will not be returned correctly to your for loop as the size of the array is 5000 not 5001. (assuming you grabbed the next 5,000 rows)
One way around this is by Tie'ing the array to a hash where the key is the index value. The next grab could either replace the key/value pairs with 5001/row data or purge the hash data structure and assign a new one depending on which is better for the application in question. The FETCHSIZE() will have to report this pseudo size so the for loop thinks there is another entry to retrieve.
The module Tie::File implements something similar.