Decisions

if, elsif, unless.

if / elsif / else. unless is inverted if.

Goal

Label a kiosk busy or quiet.

use strict;
use warnings;
use feature 'say';

my $units = 12;
if ($units >= 10) {
  say "busy";
} else {
  say "quiet";
}
use strict;
use warnings;
use feature 'say';

my $city = "Mombasa";
if ($city eq "Nairobi") {
  say "capital";
} elsif ($city eq "Mombasa") {
  say "coast";
} else {
  say "other";
}
use strict;
use warnings;
use feature 'say';

my $units = 5;
say $units >= 10 ? "busy" : "quiet";
use strict;
use warnings;
use feature 'say';

my $n = 0;
unless ($n > 0) {
  say "empty till";
}