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

i parse a certain file to get the boolean function, i need to evaluate this string and generate the truth table for the same, the string could have max 4 variables, and operators for AND is * OR is + NOT is ! or ' and XOR is ^ eg: a*b*!(c) , a'+b'+c', !(A*B) etc, thanks in adv