http://www.perlmonks.org?node_id=862135


in reply to Re: A matter of style: how to perform a simple action based on a simple condition?
in thread A matter of style: how to perform a simple action based on a simple condition?

foreach (@ray1) { push @ray2,$_ if ($_<0) }
doesn't seem to be the best example to use since it is probably better expressed with a map like
push @ray2, grep { $_ < 0 } @ray1