in reply to Re: using grep to match more than two words
in thread using grep to match more than two words
((grep/^(Sun|Moon)$/, @arr1) == 2) ? (print "True") : (print "False");
This is not reliable if @arr1 is allowed to contain duplicates, it is deemed to give false positives and false negatives, and the OP wrote nothing about that possibility.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: using grep to match more than two words
by parv (Parson) on Jun 13, 2007 at 05:34 UTC |