programming-examples/perl/_Basics/Logical Word Operators.pl

11 lines
296 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
$num1=50;
$num2=100;
$num3=0;
print "\nOutput using the word operators.\n\n";
print "\n$num1 and $num2: ",($num1 and $num2), "\n";
print "\n$num1 or $num3: ", ($num1 or $num3), "\n";
print "\n$num1 xor $num3: ",($num1 xor $num3), "\n";
print "\nnot $num3: ", not $num3;
print "\n";