jdlev has asked for the wisdom of the Perl Monks concerning the following question:
I'm not sure what I'm doing wrong here. I'm running a while loop, and all I want to do is to add another array to a multidimensional array on each pass...
Here's the code:
while ($row = $sth->fetchrow_arrayref()) { @player = [(@$row[0], @$row[4])]; }
It only prints out the last record that the array ran through?
I love it when a program comes together - jdhannibal
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Loop that creates multidimensional array?
by keszler (Priest) on Sep 12, 2013 at 16:59 UTC | |
Re: Loop that creates multidimensional array?
by Laurent_R (Canon) on Sep 12, 2013 at 17:05 UTC | |
by jdlev (Scribe) on Sep 12, 2013 at 17:15 UTC | |
by fishmonger (Chaplain) on Sep 12, 2013 at 19:11 UTC | |
Re: Loop that creates multidimensional array?
by Anonymous Monk on Sep 13, 2013 at 08:30 UTC | |
Re: Loop that creates multidimensional array?
by Marshall (Canon) on Sep 13, 2013 at 12:59 UTC |
Back to
Seekers of Perl Wisdom