Mega Code Archive

 
Categories / Perl / Statement
 

Using if statement to check if a variable is zero

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