print "Please enter a numerator: "; chomp( $numerator = ); print "Please enter a denominator: "; chomp( $denominator = ); # if condition is false, program prints message and terminates $denominator != 0 or die "Cannot divide by zero"; # executes only if $denominator is not 0 print "\nThe result is ", $numerator / $denominator, "\n";