Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Perl has all of the necessary logical operators needed to work with Boolean (true/false) values. For example, it's often useful to combine logical tests by using the logical AND operator (&&) and the logical OR operator (||):
if ($dessert{'cake'} && $dessert{'ice cream'}) {
# Both are true
print "Hooray! Cake and ice cream!\n";
} elsif ($dessert{'cake'} || $dessert{'ice cream'}) {
# At least one is true
print "That's still good...\n";
} else {
# Neither is true - do nothing (we're sad)
}