if, else, elsif in Perl
by Geethalakshmi[ Edit ] 2010-09-17 14:01:55
if, else, elsif in Perl
Simplist form - if only
if (some expression) {
true statement;
}
Using else
if (some expression) {
true statement;
} else {
false statement;
}
Using elsif
if (some expression) {
true statement;
} elsif (another expression) {
another truestatement;
} else {
false statement;
}