Roboticus@Roboticus-PC ~ $ perl t.pl 0 is false 0 is false foo is true bar is true fkento is true true is true false is true yes is true no is true is false Roboticus@Roboticus-PC ~ $ cat t.pl #!/usr/bin/perl use strict; use warnings; for my $t (0, qw(0 foo bar fkento true false yes no), '') { print "$t is ", ($t ? 'true' : 'false'), "\n"; }