in reply to Re^4: Evaluate arbitrary boolean expressions
in thread Evaluate arbitrary boolean expressions

the test does not work properly!
use strict; use warnings; use Test::More tests => 2; my $bool; sub odd { return $_[0] % 2; } $bool = (odd(3) && !odd(4)) || (!odd(3) && !odd(1)); ok ($bool, "First call is true"); $bool = (odd(3) && !odd(5)) || (!odd(3) && !odd(1)); ok (!$bool, "Second call is false");

"It doesn't work" is as useful to a developer as "I'm ill" is to a medic. Try to be specific. SSCCE is best.