CIW PERL FUNDAMENTALS - 1D0-437 Exam Practice Test
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?
1.$x = 100;
2.$y = "-25";
3.$sum = $x + $y;
4.
5.print $sum;
What is the result of executing this program code?
Correct Answer: B
Vote an answer
The filehandle INPUT is associated with the file represented by $file. Which statement will close the filehandle INPUT?
Correct Answer: D
Vote an answer
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);
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);
Correct Answer: B
Vote an answer
The filehandle INPUT is associated with the file represented by $file. Which statement will close the filehandle INPUT?
Correct Answer: D
Vote an answer
Consider the program code in the attached exhibit. What is the result of executing this program code?


Correct Answer: A
Vote an answer
Which one of the following statements opens a file for appending?
Correct Answer: B
Vote an answer
Yngve wants to define a character class that includes any alphanumeric word characters.
Which one of the following choices is best suited for this requirement?
Which one of the following choices is best suited for this requirement?
Correct Answer: A
Vote an answer
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?
BEGIN {print ("Jan ");}
BEGIN {print ("Feb ");}
END {print ("Mar ");}
END {print ("Apr ");}
Print ("May ");
What is the result of this code block?
Correct Answer: B
Vote an answer
Consider the following lines of code:
@array1 = ("apples", "oranges", "pears", "plums"); foreach (@array1)
{print "$_\n"};
What is the result of these lines of code?
@array1 = ("apples", "oranges", "pears", "plums"); foreach (@array1)
{print "$_\n"};
What is the result of these lines of code?
Correct Answer: A
Vote an answer
Which of the following choices demonstrates the correct syntax to pass a reference to a subroutine?
Correct Answer: C
Vote an answer