in reply to Re^2: grep question
in thread grep question
You can use the =~ operator to apply a regex to a string (which was what I showed you in my example). That is the straightforward way to do what you want. If you have a list or array of strings to apply, you can use map or foreach to set $_ to each of them in turn, and then you don't need the =~ operator, because a regex applies to $_ by default.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: grep question
by newest_newbie (Acolyte) on May 27, 2005 at 00:59 UTC |