>>>>> "R" == Ruud <rvtol+use...@isolution.nl> writes:
R> 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. R> my @selected = map { /before(pattern)after/ ? $1 : () } @all; no need for the ?: as list context will grab $1 or nothing. see my other post for a working one liner that shows this. uri -- Uri Guttman ------ u...@stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/