my @array = map { s/regex/replacement/ } @input;
That's why I created the trivial function apply() that later found a home in Tassilo von Parseval's List::MoreUtils.
use List::MoreUtils qw(apply); my @array = apply { s/regex/replacement/ } @input;
In reply to Re: Stupid mistakes I repeatedly make
by nobull
in thread Stupid mistakes I repeatedly make
by brian_d_foy
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |