in reply to Re^2: Logic expression evaluation not working. What am I doing wrong?
in thread Logic expression evaluation not working. What am I doing wrong?
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: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Logic expression evaluation not working. What am I doing wrong?
by Anonymous Monk on Jan 04, 2016 at 20:42 UTC | |
by AnomalousMonk (Archbishop) on Jan 04, 2016 at 20:50 UTC |