in reply to grep { } positional number of element

#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11147614 use warnings; use List::AllUtils qw( pairwise ); my @myArray = qw(alfa beta gamma); pairwise { warn "at position $a there is $b\n" } @{[ 0 .. $#myArray ]}, @myArray;