in reply to Evaluate arbitrary boolean expressions

double negation !! will return the "normalized" boolean value in Perl

D:\Users\RolfLangsdorf>perl -de0 Loading DB routines from perl5db.pl version 1.37 Editor support available. Enter h or 'h h' for help, or 'perldoc perldebug' for more help. main::(-e:1): 0 DB<1> x [!!0,!!1] 0 ARRAY(0x28d1a8) 0 '' 1 1 DB<2>

if you need more syntactic sugar, than map them with use constant or use Readonly

updates

DB<1> use constant {TRUE => !!1, FALSE=> !!0} DB<2> x [TRUE,FALSE] 0 ARRAY(0x4c6170) 0 1 1 ''

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery