in reply to array references in DBI
Thank you, ptum, for suggesting a better approach.
Thanks to the rest of you for the answers to my question. I looked at Programming the Perl DBI, and they do indeed point this out and suggest the following syntax:
while ($ra = $sth->fetchrow_arrayref) { push (@array, [@$ra]); }
which, if I understand correctly, creates a new reference pointing to the underlying data so that when $ra changes the underlying data is still pointed to in @array.
Cheers, Brian
|
|---|