in reply to Loop that creates multidimensional array?

Try this:

push @player, [(@$row[0], @$row[4])];

Replies are listed 'Best First'.
Re^2: Loop that creates multidimensional array?
by jdlev (Scribe) on Sep 12, 2013 at 17:15 UTC
    got it to work with this:
    while ($row = $sth->fetchrow_arrayref()) { @array = (@$row[0], @$row[4]); push @{ $players[$count] }, @array; }

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

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