programming-examples/perl/Statement/Using if statement to check if a variable is zero.pl
2019-11-15 12:59:38 +01:00

7 lines
80 B
Perl

if ($bottom) {
$result = $top / $bottom;
}
else {
$ result = 0;
}