in reply to getting iteration number inside iteration loop
There is not. BTW, if you:
my $iteration_number = 0; foreach my $val ( @array ) { $iteration_number ++; print ":$iteration_number:\n"; }
then you know how may times the loop was entered by inspecting $iteration_number after the loop has completed.
|
---|