Which one of the following choices is a unary operator that can apply to only a single variable?
Answer : A
Consider the following code:
$_ = "New York";
@array2 = split(//);
What is the value of $array2[0] after the code is executed?
Answer : D
Consider the following lines of code:
sub mySub {
($arg, @args) = @_;
foreach $val (@args) {
$returnVal .= "$arg, $val\n";
}
$returnVal . "" . @args;
}
print &mySub(1, "a value", "another value", "a parameter", "another parameter");
What is the output of these lines of code?
Answer : A
Which statement writes data to the filehandle OUTPUT?
Answer : D
Which statement is the most accurate?
Answer : D
Which one of the following choices will assign the current package Library1?
Answer : D
Which of the following choices demonstrates the correct syntax to pass a reference to a subroutine?
Answer : C
Which of the following is a valid subroutine name?
Answer : A
Consider the following assignments:
$x = 9
$y = 7
$z = 5
Given these assignments, which one of the following expressions evaluates as true?
Answer : C
Consider the following program code:
1.$x = 100;
2.$y = 15;
3.$result = $x % $y;
4.
5.print $result;
What is the result of executing this program code?
Answer : C
Which Perl debugger commands can be used to step through a script?
Answer : C
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?
Answer : B
Consider the program code in the attached exhibit. What is the result of executing this program code?
Answer : B
Consider the following program code:
package Dog;
$string = Walk the dog.;
if($string eq Walk the dog.)
{
package Cat;
$string = Pet the cat.;
print($string\n);
}
print ($string\n);
What is the result of executing this program code?
Answer : C
Which one of the following statements opens a file for appending?
Answer : C
Have any questions or issues ? Please dont hesitate to contact us