
WWW 181 โ Perl Programming, Quiz #2, Basic Perl
Name ________________________________
Instructions - include name, Class, Section BOLD your answers. Print and hand in next
class.
References
1) What is a reference?
2) How many types of references are there?
3) What does the ref() function return if passed a non-reference as a parameter?
4) What notation is used to dereference a reference value?
5) What is an anonymous array?
6) What is a nested data structure?
7) What will the following line of code display?
print("${\ref(\(1..5))}");
Regular Expressions
8) Can you use variable interpolation with the translation operator?
9) What happens if the pattern is empty?
10) What variable does the substitution operator use as its default?
11) Will the following line of code work?
m{.*];
12) What is the /g option of the substitution operator used for?
13) What does the \d meta-character sequence mean?
14) What is the meaning of the dollar sign in the following pattern?
/AA[.<]$]ER/