What about the case where $str1 is never found? The solutions so far presented seem to ignore that case and the results appear to be indistinguishable from first finding $str1 and then $str2.
In reply to Re: Detect Two Strings in File
by boftx
in thread Detect Two Strings in File
by omegaweaponZ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |