in reply to Re: Use of grep with arrays/hashes
in thread Use of grep with arrays/hashes
The reason for this, if I may venture a theory, is that using grep to loop through an array is contrary to grep's desired use. grep is used to return an array of matches from a supplied array of candidates.
The example posted uses grep for it's side effects (ie, executing code in the grep BLOCK that has nothing to do with testing the validity of the candidate elements in the array.
|
|---|