@res = grep (/$pat/g, @arr);
In reply to Re: grep { $var } @arr by bulrush in thread grep { $var } @arr by igelkott