brcjacks has asked for the wisdom of the Perl Monks concerning the following question:
I have a string named $rule_text an it contains:
How can I use that in an if statement? Obviously if I just do this: if $rule_text {...} it'll evaluate as true as long as it's not an empty string but that's not correct. I want to know if that string evaluates as true or false and set a flag variable as appropriate. I was hoping that this would work:($field[6] eq 'PM' && $field[8] eq 'CAVENDI')
but no luck.$ignore_flag = eval if $rule_text;
Back to
Seekers of Perl Wisdom