Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Assigning an Array to a Multidimensional Array

by gryphon (Abbot)
on Apr 23, 2002 at 16:14 UTC ( [id://161353]=note: print w/replies, xml ) Need Help??


in reply to Assigning an Array to a Multidimensional Array

Greetings keithbas,

Why exactly do you not want to use references? References are your friend. If I understand complex data structures (which maybe I don't), I'd think that any array of an array is built only by references.

Alternatively, you could push all the array data into a single, flat array. Assuming that the number of columns will never change, you could then just loop through the array...

push @currentarray, @new_data while (my @new_data = $sth->fetchrow_array);

This is really icky, IMHO, but you'd have your data in an array with no references...

-gryphon
code('Perl') || die;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://161353]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2024-04-26 01:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found