Q3. Which line of code represents the correct syntax to establish a reference to a database handle?
A. $dbh = DBI::connect("dbi:mysql:myPhoneBook");
B. $dbh = DBD:->connect("dbi::mysql::myPhoneBook");
C. $dbh = DBD::connect("mysql:dbi:myPhoneBook");
D. $dbh = DBI->connect("dbi:mysql:myPhoneBook");
Answer: D
Q4. Which one of the following choices is a unary operator that can apply to only a single variable?
A. ++
B. **
C. /
D. <?>?
Answer: A
Q5. Consider the following command: perl runme.pl arg1 arg2 arg3
Given this command issued on the command line, what is the value of $#ARGV?
A. 0
B. 1
C. 2
D. 3
Answer: C
Q6. Which statement will open the /etc/passwd file for reading only?
A. open(PASSFILE "+>/etc/passwd");
B. open(PASSFILE, "/etc/passwd");
C. open(PASSFILE "+</etc/passwd");
D. open(PASSFILE, ">/etc/passwd");
Answer: B
Q7. Running your Perl scripts with a w switch will perform which task?
A. Print all commands to the screen
B. Print warnings to the error.log file
C. Print check points in loops
D. Print warnings to the screen
Answer: D
Q8. Consider the following program code:
$x = 10;
LOOP: while ($x < 15)
{
print ($x );
if ($x >= 14 && $x <= 20)
{
$x += 2; redo LOOP;
}
else
{
$x++;
}
}
What is the result of executing this program code?
A. The code will output the following: 11 12 13 14 15 16 17 18 19
B. The code will output the following: 10 11 12 13 14 16 18 20 22
C. The code will output the following: 10 11 12 13 14 16 18 20
D. The code will output the following: 10 11 12 13 14 15 16 17 18 19 20
Answer: B
Q9. Consider the following program code:
@stack = (10, 10..25); push(@stack, yellow); shift(@stack); push(@stack, white); print shift(@stack);
What is the result of executing this program code?
A. The code will fail at line 3 because shift requires two arguments.
B. The code will output the following: 11
C. The code will output the following: 10
D. The code will output the following: white
Answer: C
Q10. Consider the program code in the attached exhibit. What is the result of executing this program code?
A. The code will output the following: 50
B. The code will output the following: 0
C. The code will output the following: 5
D. The code will output the following: multiply(5, 10)
Answer: B
Q11. Consider the following program code:
@array = ("one", "two"); push(@array, "three"); shift(@array); unshift(@array, "four"); pop(@array);
print($array[0]);
What is the output of this code?
A. one
B. two
C. three
D. four
Answer: D
Q12. Which one of the following choices will assign the current package Library1?
A. package::Library1;
B. Library1::package;
C. package(Library1);
D. package Library1;
Answer: D
P.S. Easily pass 1D0-437 Exam with Allfreedumps Breathing Dumps & pdf vce, Try Free: https://www.allfreedumps.com/1D0-437-dumps.html ( New Questions)