CIW 1D0-437 CIW Perl Specialist Exam Practice Test

Page: 1 / 14
Total 169 questions
Question 1

Which of the following is a valid subroutine name?



Answer : A


Question 2

The filehandle INPUT is associated with the file represented by $file. Which statement will close the filehandle INPUT?



Answer : D


Question 3

Which of the following accurately describes the roles of the Database Interface Module (DBI) and the Database Driver Module (DBD)?



Answer : B


Question 4

Consider the following program code:

%employees = ("Lucy", "Accounting", "Armando", "Finance",

"Adrienne", "Marketing");

delete($employees{"Lucy"});

Which of the following lines of code has the same effect as the preceding code?



Answer : D


Question 5

Consider the following lines of code:

1.$playerStr = "Today's player is Bob Petit.";

2.if($playerStr =~ /[Ruth|Gehrig|DiMaggio]/) {

3. $game = "Baseball";

4.}else{

5. $game = "Basketball";

6.}

7.print $game;

What is the output of these lines of code?



Answer : C

[Note] /[ Ruth|Gehrig|DiMaggio ]/ <=> /[ RuthGehrigDiMaggio ]/

don't confuse with /( Ruth|Gehrig|DiMaggio )/


Question 6

Consider the following program code

@array - (1..5);

print(shift(@array) . " ");

print(shift(@array) . " ");

print(pop(@array) . " ");

print(pop(@array( . " ");

push(@array, "SIX");

print(shift(@array) . " ");

print(shift(@array) . " ");

What is the result of executing this program code?



Answer : C


Question 7

Consider the following program code

print("1 ");

BEGIN { print ("2 "); }

END { print ("3 "); }

BEGIN { print ("4 ") }

END

{

package MyPackage;

print ("5 ");

}

What is the result of executing this program code



Answer : B


Page:    1 / 14   
Total 169 questions