in reply to grepping arrays
or a pattern match:grep $username eq $_, @ignore
Note that the second is still an expression, and gets evaluated with each element in @ignore aliased to $_ in turn. You can just write it in this short form because by default, matches are attempted against $_ unless otherwise specified. So the second form is exactly equivalent to this:grep /$username/, @ignore
grep $_ =~ /$username/, @ignore
Makeshifts last the longest.
|
---|