for my $i (0 .. $#rows) { ... # something with $rows[$i] }