Книга: Fedora™ Unleashed, 2008 edition

unless

unless
unless
works just like if, 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";

Содержание
Оглавление статьи/книги

Генерация: 1.236. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз