Question No: 4
Consider the following program code:
@array = ("ALPHA", "beta", "GaMmA"); sort(@array);
print("@array");
What is the output of this code?
A. beta GaMmA ALPHA
B. ALPHA GaMmA beta
C. ALPHA beta GaMmA
D. beta ALPHA GaMmA
Answer: C
Question No: 5
Consider the following program code:
package Dog;
$string = Walk the dog.; if($string eq Walk the dog.)
{
package Cat;
$string = Pet the cat.; print($stringn);
}
print ($stringn);
What is the result of executing this program code?
A. The code will output the following: Pet the cat.
B. The code will output the following: Walk the dog.
C. The code will output the following: Pet the cat.
Walk the dog.
D. The code will output the following: Walk the dog.
Pet the cat.
Answer: C
Question No: 6
In Perl, packages are used for which task?
A. To label a program
B. To encrypt a program
C. To create new keywords
D. To define a namespace
Answer: D
Question No: 7
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
Question No: 8
Which one of the following choices uses the correct syntax for a valid array assignment?
A. @cities = Akron, Memphis, Ogden, Phoenix;
B. @cities =~ ("Akron, Memphis");
C. @cities =~ (Akron, Memphis, Ogden, Phoenix);
D. @cities = ("Akron");
Answer: D
Question No: 9
Consider the following program code:
if ("cool" =~ m/[cool]{4}/)
{
print("True ");
}
else
{
print("False ");
}
if ("cool" =~ m/[col]{4}/)
{
print("True ");
}
else
{
print("False ");
}
What is the output of this code?
A. False False
B. False True
C. True False
D. True True
Answer: D
Question No: 10
Which one of the following statements uses correct syntax and expressions?
A. do (print "Hello $a") until ($a = 10);
B. do {$a++} until {$a == $b};
C. do {$in = $in++} while ($in < 100);
D. do ($a++) until ($b = $a);
Answer: C
Question No: 11
Consider that a file named test.txt contains this line of text: One line of test text.
What is the output of the following lines of code?
$file = "test.txt";
open (OUT, "<$file") || (die "cannot open $file: $!"); seek(OUT, 15, 0);
read(OUT, $buffer, 5); print $buffer . "n"; print tell(OUT);
A. t text 20
B. t tex 19
C. t text 19
D. t tex 20
Answer: D
Question No: 12
The filehandle INPUT is associated with the file represented by $file. Which statement will close the filehandle INPUT?
A. close (INPUT, $file);
B. closeINPUT;
C. INPUT(close, $file);
D. close(INPUT);
Answer: D
Question No: 13
Which Perl debugger commands can be used to step through a script?
A. b and d
B. t and c
C. s and n
D. X and V
Answer: C
Recommend!! Get the Real 1D0-437 dumps in VCE and PDF From Certleader, Welcome to download: https://www.certleader.com/1D0-437-dumps.html (New Q&As Version)