Created
July 6, 2010 22:22
-
-
Save perlDreamer/466009 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here's an example (assumes RaiseError is enabled): | |
my $rows = []; # cache for batches of rows | |
while( my $row = ( shift(@$rows) || # get row from cache, or reload cache: | |
shift(@{$rows=$sth->fetchall_arrayref(undef,10_000)||[]}) ) | |
) { | |
... | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment