true and false are barewords with no special meaning in Perl.
Moreover, you should use strict: it would have told you
Bareword "false" not allowed while "strict subs" in use at - line 1.
Bareword "true" not allowed while "strict subs" in use at - line 2.
The common value used for true is 1, for false, you can use 0, "" or undef.
Also, $a and $b are special variables used in sort, it's better not to use them anywhere else.
#!/usr/bin/perl
use warnings;
use strict;
my $A = 0;
my $B = 1;
print "Value of \$A = $A and value of \$B = $B\n";
my $c = ($A and $B);
print "Value of \$A and \$B = $c\n";
$c = ($A && $B);
print "Value of \$A && \$B = $c\n";
$c = ($A or $B);
print "Value of \$A or \$B = $c\n";
$c = ($A || $B);
print "Value of \$A || \$B = $c\n";
$A = 0;
$c = not($A);
print "Value of not(\$A)= $c\n";
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord
}map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|