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; }

Replies are listed 'Best First'.
Re^3: Loop that creates multidimensional array?
by fishmonger (Chaplain) 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?
[Corion]: Discipulus: You got pushed too much under water?
[Corion]: marto: Oooh - cinema... I guess that's something I could do with my godson and sibling and sister as well, but I guess that getting a six year old and two four year olds into one movie is a tough sell ;)
[marto]: busy weekend, no me time :P
[Corion]: marto: Yeah, that's somewhat implied :) I was on the phone with my godson yesterday (they birthday), but I haven't seen them for two weeks now (vacation), relaxing, but I somewhat miss them too ;)
[Discipulus]: me waterpolo? oh no! i'm a no sport; the tournment was for the elder son
[karlgoethebier]: good morning

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2017-07-24 08:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (348 votes). Check out past polls.