in reply to shorter 1 liner way of doing this
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: shorter 1 liner way of doing this
by theleftright (Novice) on Dec 27, 2015 at 21:27 UTC | |
by LanX (Saint) on Dec 27, 2015 at 22:15 UTC | |
by fishmonger (Chaplain) on Dec 27, 2015 at 21:47 UTC |