in reply to find a specific word

Take a look at the following example under the Perl debugger:

DB<15> @c = qw /jan feb mar apr may jun/ DB<16> for ( 0..$#c ) { print $_ if $c[$_] =~ /ay/ } 4