my $x = 0; while ($printrows[$x][0]) { print "First: $rows[$x][0]\n"; print "Second: $rows[$x][1]\n"; }