Does the inner loop even make sense? You'll just end up printing the same line over and over again. Don't you want
while (<$search_file>) { print $wave $_ if /$regex/ && !/SCRIPTNAME|DESCRIPTION/; }
As for the new requirement, Is there any way you can build a hash or regex pattern from it?
In reply to Re: nesting loops help?
by ikegami
in thread nesting loops help?
by shadowfox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |