for ($i = 0; $i < @array; ++$i) { # do something with $array[$i] }