http://www.perlmonks.org?node_id=686315


in reply to Re^2: Generate a truth table from input string
in thread Generate a truth table from input string

$str =~ s/'/!/g;
is not sufficient to convert a postfix operator to a prefix operator. "a'" produces the invalid code "1!".