---------------------------------------------------------------------------- Q1: #!/usr/bin/perl -w $radius = 12.5; $pi = 3.141592654; $circumference = 2 * $pi * $radius; print "The circumference of a circle with a radius of $radius is $circumference.\n"; exit; ----------------------------------------------------------------------------- Q2: #!/usr/bin/perl -w $pi = 3.141592654; print "Type in the radius of a circle and I'll calculate the\n"; print "circle's circumference.\n"; print "Type in a number and press ENTER.\n"; chop( $radius = ); $circumference = 2 * $pi * $radius; print "The circumference of a circle with a radius of $radius is $circumference.\n"; exit; ----------------------------------------------------------------------------- Q3: #!/usr/bin/perl -w print "Give me two numbers and I'll multiply them.\n"; print "Type in the first number and press ENTER.\n"; chop( $firstNum = ); print "Type in the second number and press ENTER.\n"; chop( $secondNum = ); print "$firstNum times $secondNum is ",$firstNum*$secondNum,".\n"; exit; ------------------------------------------------------------------------------ Q4: #!/usr/bin/perl -w print "Give me a string and I'll print it out a bunch of times.\n"; print "Type in your string and press ENTER.\n"; chop( $str = ); print "Type in the number of times to repeat the string and press ENTER.\n"; chop( $repeat = ); print "$str\n" x $repeat; exit;