in reply to Re^3: Dynamic if loop
in thread Dynamic if statement

When your code snippet is wrapped in <code> ... </code> tags, it looks like this:

foreach $ruleword ( @splitrule ) { if( $word =~ m/$ruleword/igs ) { print "\t$word\tmatched\n"; } }

And that looks fine (except the /g is probably not useful in this context). So why do you think you need to generate code?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"