CIW PERL FUNDAMENTALS - 1D0-437무료 덤프문제 풀어보기
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?
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?
정답: D
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?
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?
정답: C
Which of the following choices demonstrates the correct syntax to pass the argument $arg2 to the subroutine getpass?
정답: A
Which keyword indicates an object reference rather than a variable reference?
정답: A
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?
정답: C
Which one of the following choices lists the three loop-control commands?
정답: B
Consider the program code in the attached exhibit. What is the result of executing this program code?


정답: B
Consider the following program code:
$i = 15;
LOOP: for(; $i < 25; $i++)
{
if ($i % 2)
{
next LOOP;
}
print($i );
}
What is the result of executing this program code?
$i = 15;
LOOP: for(; $i < 25; $i++)
{
if ($i % 2)
{
next LOOP;
}
print($i );
}
What is the result of executing this program code?
정답: C
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?
$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?
정답: D
Which statement will print the capital attribute of the $kansas object?
정답: D