http://qs321.pair.com?node_id=11119163


in reply to Expression form of map or grep

Generally speaking, the block form is more flexible and more readable, however the expression form of grep is pretty readable if you're just doing a regexp match:

my @results = grep /searchterm/i, @inputs;

When things get more complicated than that, I'd generally prefer the block form.

The expression form can run slightly faster if optimization is a concern.