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


in reply to Re: Re: Help me not use codefor($i=0;$i=$#array;$i++)/code...Please!
in thread Help me not use for($i=0;$i=$#array;$i++)...Please!

If you bracket it, the grep expression becomes a block. It can be as complicated as you please. If it evaluates true, $_ (possibly modified within the block) is placed in the returned array.

After Compline,
Zaxo

Update: Corrected block <-> expr terminology.