for (my $i = 0; $i < @array; $i++) { use $array[$i] here } #### for my $a (@array) { use $a directly here }