while(my @tmp = $sth->fetchrow_array) { $array[$i][0] = $tmp[0]; $array[$i][1] = $tmp[1]; $array[$i][1] = $tmp[2]; $array[$i][2] = $tmp[3]; $i++; }