- or download this
my $x = 1;
if ($x) {
...
} else {
g();
}
- or download this
my $x = 0;
if ($x) {
...
} else {
g(); # g() is the last expression evaluated.
}
- or download this
my $x = 0;
if ($x) { # $x is the last expression evaluated.
f();
}
- or download this
my $x = 0;
if ($x == 1) {
...
} elsif ($x == 2) ( # $x==2 is the last expression evaluated.
g();
}