B# Perl Q1: Which of the following keyword is used to make an object reference? ^A) Return ^B) Bless ^C) Package ^D) Object C# Perl Q2: Which of the following describes the most accurate difference between the "my" and the "local" expression? ^A) Using my operator variables make the entire script private. ^B) Local expression is used to declare variables available called within the sub references when arrays or hashes are used as arguments. ^C) My expression makes variables private so they can only be used in the current sub and not be passed onto other subs called from within the subroutines. ^D) It allows the variable to be passed on to other subs called from within the subroutine. D# Perl Q3: Which one is the least effective method of reducing code errors? ^A) Use -w switch and create pseudo code before you start. ^B) Write reusable code and modular approach. ^C) Declare and initialize variables. ^D) Keep strings short and use the non strict pragma at all times. A# Perl Q4: What is the @ISA array used for? ^A) It is used for inheritance wherein a class is said to share a relationship with the classes listed within the @ISA array. ^B) It is to create relations between classes and methods. ^C) It is to have reusable code in related classes. ^D) It is to inherit classes among methods. A# Perl Q5: which of the following is NOT a common perl error? ^A) print MYFILEHANDLE ("Perl makes my life easier."); $ INCORRECT ^B) The == and the eq operators as well as numeric operators (== !=) and string operators(eq,ne) are used as same operators. ^C) A block of code is not surrounded by braces ({ }). ^D) An array operator (@) is used incorrectly in scalar context, such as @array[1] when it should be $array[1]. D# Perl Q6: how do you write to a file with the filehandle HANDLE? ^A) write ( HANDLE, "< write something"); ^B) print ( HANDLE, "write something"); ^C) Write ( HANDLE "write something") ^D) print ( HANDLE "write something"); A# Perl Q7: For what are objects used for? ^A) Makes scripts easier to use and maintain. ^B) Provide labels for defined code. ^C) Create package defenition files. ^D) Divide codes into smaller pieces. D# Perl Q8: How do you create a filehandle for appending? ^A) append ( HANDLE, "write something"); ^B) print ( HANDLE, "< file.txt"); ^C) open ( HANDLE "+>write something"); ^D) open ( HANDLE "