Home > Certified Internet Web Professional > Quizzes > CIW Perl Specialist Exam 1D0-437 - Practice Test 2
CIW Perl Specialist Exam 1D0-437 - Practice Test 2
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 7% Most missed: “Which one of the following choices lists the three loop-control commands?”
CIW Perl Specialist Exam 1D0-437 - Practice Test 2
Time left 00:00
25 Questions

1. Consider the following command perl1 runme.pl arg1 arg2 arg3 Given this command issued on the command line, what is the value of $#ARGV?
2. Which one of the following statements opens a file for appending?
3. Consider the following program code: $var = 10; package Alpha; $var = 20; { package Beta; $var = 30; } package Gamma; $var = 40; { print $var; } What is the output of this code?
4. Which Perl debugger commands can be used to step through a script?
5. In Perl, modules are used for which task?
6. Consider the following program code: 1.$x = 100; 2.$y = -25"; 3.$sum = $x + $y; 4. 5.print $sum; What is the result of executing this program code?"
7. Which one of the following choices lists only valid expression operators?
8. Which one of the following choices lists valid assertions that represent places within a string?
9. Which keyword indicates an object reference rather than a variable reference?
10. Consider the following statement: for ($count=0; $count < 5; $count++) {print $count "} What will be the output from the given statement?"
11. Consider the program code in the attached exhibit. What is the result of executing this program code?
12. The filehandle INPUT is associated with the file represented by $file. Which statement will close the filehandle INPUT?
13. Consider the program code in the attached exhibit. What is the result of executing this program code?
14. Which one of the following choices will assign the current package Library1?
15. Which statement is the most accurate?
16. Which one of the following choices is a unary operator that can apply to only a single variable?
17. 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?"
18. Consider the following command: perl runme.pl arg1 arg2 arg3 Given this command issued on the command line, what is the value of @ARGV?
19. Running your Perl scripts with a d switch will perform which task?
20. Consider the following lines of code: sub mySub { $_ = @_[1]; $a = shift; $b = shift; return $a * $b * $_; } mySub(1,2,3); What is the output of these lines of code?
21. Consider the following program code $Animal -Dogs bark"; package Cat; $Animal = "Cats purr"; { package Fish; $Animal -"Fish swim"; } package main; print $Animal; What is the result of executing this program code?"
22. Consider the following assignments $x = 9 $y = 7 $z = 5 Given these assignments, which of the following expressions evaluates as true?
23. Which of the following correctly creates a SQL statement that will insert the values of the $name and $age variables into a database? The statement is assigned to the $sqlStmt variable. Assume a CHAR data type for $name and an INT data type for $age.
24. Consider the following code block: BEGIN {print (Jan ");} BEGIN {print ("Feb ");} END {print ("Mar ");} END {print ("Apr ");} Print ("May "); What is the result of this code block?"
25. Consider the following program code: if (Apple" gt "Pear") { print("True "); } else { print("False "); }if ("Banana" le "Banana") { print("True "); } else { print("False "); } What is the result of executing this program code?"