($nextline=~/$SearchString/)
Is it maybe that you have the comparison wrong? You are comparing whether $nextline matches /$SearchString/. I interpret your description as that you want to stay in the loop while $nextline does not match /$SearchString/:
($nextline!~/$SearchString/)
In reply to Re^3: reading lines from a text file
by Corion
in thread reading lines from a text file
by misba
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |