for my $i(0..$#array) { #same thing as your C-like for stuff; }