If statement with scalar variable : If « Statement « Perl
- Perl
- Statement
- If
If statement with scalar variable
$variable = 5;
if ($variable == 5) {
print "Yes, it's five.\n";
} else {
print "No, it's not five.\n";
}
Related examples in the same category