5.8. Dividing two numbers given by the userAsk the user for two numbers and divide the first by the second number. Example 5-8. examples/scalars/divide.pl #!/usr/bin/perl use strict; use warnings; print "First number: "; my $x = <STDIN>; chomp $x; print "Second number: "; my $y = <STDIN>; chomp $y; my $z = $x / $y; print "The result is $z\n"; $ perl examples/divide.pl
|