Multichoice Quiz

There are 6 questions in this test.
(Only a correct response on the first attempt will increase your score.)

Question 1 Which flag is used to execute Perl statements directly from the UNIX command line?
-e
-x
-w
You don't need a flag.
  
Question 2 Nearly every Perl statement ends in
#
;
.
!
  
Question 3 Perl comments begin with
#
;
//
None of the above.
  
Question 4 Which lines produce the following output?
pie in the sky
pie in the sky
$food = "pie";print '$food in the sky';print '$food in the sky';
$food = 'pie';print '$food in the sky\n';print '$food in the sky\n';
$food = "pie";print "$food in the sky";print "$food in the sky";
$food = 'pie';print "$food in the sky\n";print "$food in the sky\n";
  
Question 5 What does the following program print?
#!/usr/bin/perl
$word= "pet";
chop $word;
chop $word;
$word = $word.'ies';
pet
pies
petpies
Nothing - because there's an error in the program.
  
Question 6 Which statement is a legal scalar assignment?
Days14 = 0;
$DAYS____14 = 0;
$14Days = 0;
$Days.14 = 0;