Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Loop that creates multidimensional array?

by jdlev (Scribe)
on Sep 12, 2013 at 17:15 UTC ( #1053772=note: print w/ replies, xml ) Need Help??


in reply to Re: Loop that creates multidimensional array?
in thread Loop that creates multidimensional array?

got it to work with this:

while ($row = $sth->fetchrow_arrayref()) { @array = (@$row[0], @$row[4]); push @{ $players[$count] }, @array; }


Comment on Re^2: Loop that creates multidimensional array?
Download Code
Re^3: Loop that creates multidimensional array?
by fishmonger (Friar) on Sep 12, 2013 at 19:11 UTC

    No need to copy the 2 items to a new array.

    while (my $row = $sth->fetchrow_arrayref) { push @{ $players[$count] }, $row->[0], $row->[4]; }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2015-07-04 06:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (58 votes), past polls