in reply to Logic expression evaluation not working. What am I doing wrong?
my %allowed = qw{ ( ( ) ) ! !! & && }; my $finalExpr = map { $allowed{$_} || die "not allowed '$_'" } split ' +', $expr; my $result = eval $finalExpr;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Logic expression evaluation not working. What am I doing wrong?
by mr_ron (Deacon) on Jan 04, 2016 at 16:30 UTC | |
by AnomalousMonk (Archbishop) on Jan 04, 2016 at 20:02 UTC | |
by Anonymous Monk on Jan 04, 2016 at 20:42 UTC | |
by AnomalousMonk (Archbishop) on Jan 04, 2016 at 20:50 UTC | |
by Anonymous Monk on Jan 04, 2016 at 18:41 UTC |