Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 (Pilgrim) 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 chanting in the Monastery: (7)
As of 2014-12-25 11:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (160 votes), past polls