#!c:perl/perl.exe use strict; use warnings; my ($num1,$num2,$sign); while (1) { print "Enter the First Number "; chomp ($num1=); last if $num1=~/^\d+$/; } while (1) { print "Enter The Second Number "; chomp ($num2=); last if $num2=~/^\d+$/; } print "Please enter the Maths that you want to perform: \n\n"; print "1 = \+\n"; print "2 = \-\n"; print "3 = \*\n"; print "4 = \/\n"; print "5 = Mulitiplication Table \n \n"; chomp($sign=); if ($sign==1) { print "The Sum of the Numbers $num1 + $num2 is ", $num1 + $num2, "\n"; } if ($sign==2) { print "The Difference of the numbers $num1 - $num2 is ",$num1 - $num2, "\n"; } if ($sign==3) { print "The Product of $num1 X $num2 is ",$num1 * $num2 , "\n"; } if ($sign==4) { print "The Division of $num1 / $num2 is ", $num1 / $num2 , "\n"; } if ($sign==5) { print "the Multiplication Table For $num1 and $num2 is \n"; for (1 ..$num2) { print "$_ X $num1 = ", $_*$num1, "\n"; } }