http://qs321.pair.com?node_id=1060579

brcjacks has asked for the wisdom of the Perl Monks concerning the following question:

I have a string named $rule_text an it contains:
($field[6] eq 'PM' && $field[8] eq 'CAVENDI')
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:
$ignore_flag = eval if $rule_text;
but no luck.