programming-examples/perl/Statement/Using if statement to check if a variable is zero.pl

7 lines
80 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
if ($bottom) {
$result = $top / $bottom;
}
else {
$ result = 0;
}