5 grep {$_ eq 'foo'} @list;
6 @matches = grep {$_ eq 'foo'} @list;
7 grep( {$_ eq 'foo'} @list );
8 @matches = grep( {$_ eq 'foo'} @list )
11 {grep}; # for Devel::Cover
12 grelp $_ eq 'foo', @list; # deliberately misspell grep
14 #-----------------------------------------------------------------------------
20 grep $_ eq 'foo', @list;
21 @matches = grep $_ eq 'foo', @list;
23 #-----------------------------------------------------------------------------
25 ## name Things that may look like a grep, but aren't
32 #-----------------------------------------------------------------------------
34 ##############################################################################
35 # $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/t/BuiltinFunctions/RequireBlockGrep.run $
36 # $Date: 2008-03-16 17:40:45 -0500 (Sun, 16 Mar 2008) $
37 # $Author: clonezone $
39 ##############################################################################
43 # cperl-indent-level: 4
45 # indent-tabs-mode: nil
46 # c-indentation-style: bsd
48 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :