Shawn H Corey wrote:
Uri Guttman wrote:
that modifies @ARGV so it is a bad idea. also it bypasses grep's purpose
of filtering a list. and as i posted, map is the correct solution
map is not the correct solution since it does not filter out those which
do not match the pattern. Only grep can do that.
my @selected = map { /before(pattern)after/ ? $1 : () } @all;
--
Ruud
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/