The %allowed hash doesn't look right ...
I would be more concerned about the map statement:
c:\@Work\Perl>perl -wMstrict -le "my $expr = '(!(C)&T)&!Q'; my %allowed = qw{ ( ( ) ) ! !! & && C 1 T 1 Q 1 }; my $finalExpr = map { $allowed{$_} || die qq{not allowed '$_'} } spli +t '', $expr; print qq{'$finalExpr'}; " '11'
Give a man a fish: <%-{-{-{-<
In reply to Re^3: Logic expression evaluation not working. What am I doing wrong?
by AnomalousMonk
in thread Logic expression evaluation not working. What am I doing wrong?
by perl_learner_2016
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |