Hey all,
I'm trying to load a list of strings to match on into an array and then do an
if($content =~ /$matchlist[$i]/ || /$matchlist[$i+1]) ....
It is necessary that I have one big atomic match in this if statement, I can't wrap it in a for loop.
Anyways, I'm having a hard time trying to use qr// to build this statement and have it parsed as an expression. The O'Reilly example on "Generating patterns" with the VVCVV seems to not be exactly what I'm looking for.
Does anybody know of a better example to build a list of regexs in the script, then using it as the if statement later? I'm having a hard time finding any examples or info on this.
I'm trying to load a list of strings to match on into an array and then do an
if($content =~ /$matchlist[$i]/ || /$matchlist[$i+1]) ....
It is necessary that I have one big atomic match in this if statement, I can't wrap it in a for loop.
Anyways, I'm having a hard time trying to use qr// to build this statement and have it parsed as an expression. The O'Reilly example on "Generating patterns" with the VVCVV seems to not be exactly what I'm looking for.
Does anybody know of a better example to build a list of regexs in the script, then using it as the if statement later? I'm having a hard time finding any examples or info on this.