in reply to grep { } positional number of element
Or, if you dislike loops:
use v5.16; use List::MoreUtils 'reduce_u'; my @array = qw(alpha beta gamma); reduce_u {say "at position $_ there is $b"} @array; [download]
Greetings,-jo