1. What does this line do?

Removes the headers from your email and prints out the body
Removes the headers from your email and prints a blank line
Prints out all the From: and Subject: lines from a mailbox
None of the Above

2. What does this loop do?

Adds Re: to an email subject, if it's not already there
Removes the subject from email
Makes the Re: into lowercase
None of the Above

3. What does this loop do:

Deletes all the lines with Foo in them
Prints all the lines with Foo in them
Deletes all the lines without Foo in them
None of the Above

4. Which one of the following regular expressions would match the word in and the word inch, but not the word grin?

/\bin\b/
/\bin/
in\b/
None of the Above

5. What does this expression do?

Doubles every word (for example, now now is is the the) in a line
Removes doubled words (for example, now is the the time for...) from a line
Removes all the w's from a line
None of the Above

6. To avoid using two users opening the same file in read/write mode, use

filelock()
lock()
flock()
lockf()

7. Which of the following tests if the string held in $qn includes the word "perl"?

if ($qn =~ /perl/) .....
if ($qn == "perl") ....
if ($qn = "perl") .....
if ($qn eq "perl") .....

8. Which of the following is NOT a comment line in a Perl program?

# This is a comment
#/#/#/#/#/#/#/#/#/#/#/#/#/#/#/#/#/#/#/#/#/#/#/#/#/#/#/#/#/
##########################################################
//////////////////////////////////////////////////////////

9. $x = @y[2 .. 4]

assigns$x the third, fourth and fifth elements of the y array concatenated together.
assigns$y[4] to $x.
assigns$y[2] to $x.
assigns 3 to$x.

10. <ARGV>

identifies any command line arguments starting with a-.
will read the standard input if no arguments are listed on the command line.
can be used to read each line in every file name listed on the command line.
more than one of the above is correct.