Which of the following is a valid subroutine name?
Answer : A
The filehandle INPUT is associated with the file represented by $file. Which statement will close the filehandle INPUT?
Answer : D
Which of the following accurately describes the roles of the Database Interface Module (DBI) and the Database Driver Module (DBD)?
Answer : B
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
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 )/
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
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