in reply to Evaluate arbitrary boolean expressions
I can then combine the results from multiple calls to the aforementioned sub to create a more complex boolean expression such as (T && F) || (F && F) etc.
If your sub is called foo() then it's simply
my $bool = (foo() && !foo()) || (!foo() && !foo());
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Evaluate arbitrary boolean expressions
by gauss76 (Scribe) on Mar 13, 2018 at 10:57 UTC | |
by roboticus (Chancellor) on Mar 13, 2018 at 11:00 UTC | |
by gauss76 (Scribe) on Mar 13, 2018 at 11:30 UTC | |
by hippo (Archbishop) on Mar 13, 2018 at 11:54 UTC | |
by Corion (Patriarch) on Mar 13, 2018 at 11:44 UTC |