Work Sheet 1 for Perl

Do the following problems.
  1. Write a Perl Program that given miles, convert into kilometers.
  2. Write a Perl program to find the factorial of a number that is given as input.
  3. What does the following Perl program do?
    print "String: "; $a= <STDIN > ;
    
    print "Number of Times: "; chomp($b= < STDIN >);
    $c = $a x $b; pritn "The Result is: \n$c";
    
    What happens if we chomp($a=); in the first line?
  4. Write a Perl program to add the elements in an array. Assume that an array of numbers is given.