use warnings; use strict; use List::MoreUtils qw(indexes); my @array = qw("this" "xxx" "is" not "xxx" and "xxx" "whatever"); my @indexes = indexes { /xxx/ } @array; print @indexes;
In reply to Re: shorter 1 liner way of doing this
by fishmonger
in thread shorter 1 liner way of doing this
by theleftright
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |