while ( @row = $sth->fetchrow_array ) { push @x, [ @row ]; } #### $rindex = 0; $i = 1; do { foreach ( @columns ) { if ( $_ <= $qstart_column - 2 ) { $unsorted[$rindex][$_] = $x[$i][$_]; } else { $unsorted[$rindex][$_] = $x[$i][$_ - $nun_of_questions]; } } $rindex += 1; $i += $nun_of_questions; } while ( $i <= $#x ); #### Use of reference "ARRAY(0x10b5810)" as array index at /home/dmathis/qwest_qqs/transpose-qqs-dev line 367. Use of reference "ARRAY(0x10b5810)" as array index at /home/dmathis/qwest_qqs/transpose-qqs-dev line 367. Use of uninitialized value in numeric comparison (<=>) at /home/dmathis/qwest_qqs/transpose-qqs-dev line 367. Use of uninitialized value in numeric comparison (<=>) at /home/dmathis/qwest_qqs/transpose-qqs-dev line 367. ................ ................ ................