in reply to GREP case insensitivity
(note the comma after the regex)my @bintext2 = grep /$input/i, @bintext;
You only need curlies if you are using grep with a code snippet (item is selected if the code returns true) -- e.g.:
(note: no comma after the code block)my @bintext2 = grep { /$input/i and length()>20 } @bintext;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: GREP case insensitivity
by jwkrahn (Abbot) on Nov 14, 2008 at 01:59 UTC |