in reply to How to preserve all instances from a database in an array?

Perhaps you could try this. I have used it in the past and it worked then.

use strict; use warnings; our @saveForLater = (); our $cursor = $db->prepare("select recno,name from TABLE;"); $cursor->execute(); while(my ($recNo, $name) = $cursor->fetchrow()) { # Do something with results ... # Save data for further processing push @saveForLater, [$recNo, $name]; } ... # Later in the program foreach my $refToRow (@saveForLater) { print "Record No. - $refToRow->[0]\n", "Name - $refToRow->[1]\n"; # Or whatever you want to do. }

I hope this is of use.

Cheers,

JohnGG