Beefy Boxes and Bandwidth Generously Provided by pair Networks httptech
Just another Perl shrine
 
PerlMonks  

Re: Re: Multiple references pointing to the same memory location

by bwana147 (Pilgrim)
on Jul 31, 2001 at 09:10 UTC ( [id://101103]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Multiple references pointing to the same memory location
in thread Multiple references pointing to the same memory location

Be careful here: the OP wanted a list of array refs, each one containing a row of data. If you push(@entries, @$columns_ref), you'll end-up with @entries being a flat list of all the columns, without any way of knowing where each row starts or ends. You really must create a new array, copy the values from the array referenced by $column_ref and push a reference to the new array. This can be done easily, as has already been pointed out:

push(@entries, [ @$columns_ref ]);

--bwana147

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://101103]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.