Perl Programming Fundamentals

Covers essential Perl concepts including regex, variables, file I/O, and command-line options

8 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

In Perl, a/n ________ is a special character or a sequence that will define the number of times the previous character or sequence appears.

  1. character class
  2. metacharacter
  3. assertion
  4. quantifier
Question 2 Multiple Choice (Single Answer)

In Perl, the following will result in which of the following, if the prize is currently "5 dollars" print 'You won $prize';

  1. You won $5.00
  2. You won 5 dollars
  3. You won $prize
  4. You won $5
Question 3 Multiple Choice (Single Answer)

In Perl, the words function and subroutines are used interchangeably.

  1. True
  2. False
Question 4 Multiple Choice (Single Answer)

In Perl, which of the following are file handles?

  1. stdquit
  2. stdend
  3. stdin
  4. stdout
  5. C&D
Question 5 Multiple Choice (Single Answer)

In Perl, which switch is used for printing out warnings about typographical errors in your script?

  1. -P
  2. -W
  3. -p
  4. -w
Question 6 Multiple Choice (Single Answer)

In Perl, "stat" returns a thirteen element array with which of the following values?

  1. Perl version ID
  2. Web server ID
  3. Last access
  4. Inode number
  5. C&E
Question 7 Multiple Choice (Single Answer)

CGI is a programming language.

  1. True
  2. False
Question 8 Multiple Choice (Single Answer)

In Perl, scalar variables always begin with a ________ sign.

  1. #
  2. @
  3. %
  4. $