Книги автора: Fedora™ Unleashed, 2008 edition
/ Книги автора: Fedora™ Unleashed, 2008 edition
/ honorato bonafe
Книга: Fedora™ Unleashed, 2008 edition
unless
unless
works just like
unlessif
, only backward. unless
performs a statement or block if a condition is false:
unless ($name eq "Rich") {
print "Go away, you're not allowed in here!n";
}
NOTE
You can restate the preceding example in more natural language like this:
print "Go away!n" unless $name eq "Rich";