RosettaCodeData/Task/Boolean-values/Perl/boolean-values-4.pl

6 lines
289 B
Perl

# This does not work
# true and false are not special so will be treated as bareword strings
if (true) { print "true is true\n" }; # This prints
if (false) { print "false is true\n" }; # So does this
if (spongebob) { print "spongebob is true\n" }; # A bareword string