in reply to Multiple references pointing to the same memory location
'Note that the same array reference will currently be returned for each fetch, don't store reference and then use it after a later fetch'
In other words you are getting a shallow copy of row array instead of the deep copy you want/need. ( of course this what you have already discovered :( ).
Why not dereference rowarray_ref and simple store and array of arrarys.
... push(@entries, [ @$colunms_ref ]); ...
Update
'Holy Flatlander Chips' bwana147 caught a my baadddd very baddd deref causing column_ref flating out. I can't claim a typo on this one folks I just plain forgot :(. thx bwana147.
In addition after a short CB discussion with davorg we reach a consensus of two that this could all be resolved by simply using fetchrow_array and avoiding all his pesky derefencing.
mitd-Made in the Dark
'My favourite colour appears to be grey.'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Multiple references pointing to the same memory location
by bwana147 (Pilgrim) on Jul 31, 2001 at 13:10 UTC |