< Perl Programming < Keywords
![](../../../I/Crystal_Clear_action_apply.png.webp)
The code
The and keyword
and is a logical short-circuit AND operator that has a very low precedence, but is otherwise equivalent to &&.
Syntax
VALUE and VALUE
Examples
![](../../../I/Crystal_Clear_action_apply.png.webp)
$a = 5; # 0101
$b = 8; # 1000
print $a and $b . ", " . $a && $b . "\n";
prints only the first variable, as it is not false:
5
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.