while ( my ( $iter, $elem ) = each @a ){ say "Iteration $iter contains $elem"; }