Assuming $a = 2, which of the following evaluates as false?
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?
Consider the program code in the attached exhibit. What is the result of executing this program code?
Consider the following program code:
$y = 1;
$x = 2;
$z = 3;
do
{
print ($y );
} while ($y eq 2);
do
{
print ($x );
} until ($x eq 2);
print ($z );
What is the result of executing this program code?
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?
Running your Perl scripts with a d switch will perform which task?
Consider the following program code:
%hash = (small => 8oz,
medium => 16oz,
large => 32oz);
@keys = sort(keys(%hash));
for ($i = 0; $i < 3; $i++) {
print($hash{$keys[$i]}\n);
}
What is the result of executing this program code?
Which line of code represents the correct syntax to establish a reference to a database handle?
In the context of Perl user-defined subroutines, which statement is the most accurate?
Consider the following statement:
@array1 = (9, "A", 0..9, "PERL");
Given this statement, @array1 consists of how many elements?
The filehandle INPUT is associated with the file represented by $file. Which statement will close the filehandle INPUT?
Assume $sth is a valid statement handle. Which of the following correctly outputs the data from the first three columns of a result set?
Consider the following program code:
%color = (sun => yellow, apple => red);
reverse(%color);
@colorKeys = sort(keys(%color));
foreach(@colorKeys)
{
print($color{$_} . );
}
What is the result of executing this program code?
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?
Which statement writes data to the filehandle OUTPUT?
Consider the following program code:
$x = 150;
$y = "250";
if (($x + 100) == $y) { print("1 "); }
if ("250" == $y) { print("2 "); }
if ("250" eq $y) { print("3 "); }
if ($x lt $y) { print("4 "); }
if ($x ge $y) { print("5 "); }
What is the result of executing this program code?
Consider the following program code:
@array = ("Y", "W", "X");
@array = sort(@array);
unshift(@array, "Z");
print(@array[0]);
What is the output of this code?
Consider the following program code:
$var = 10;
package Alpha;
$var = 20;
{
package Beta;
$var = 30;
}
package Gamma;
$var = 40;
{
print $var;
}
What is the output of this code?
Consider the following program code:
@array = ("ALPHA", "beta", "GaMmA");
sort(@array);
print("@array");
What is the output of this code?
Consider the following program code:
@array = ("ALPHA", "beta", "GaMmA");
@array = sort(@array);
print("@array");
What is the output of this code?
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?
Which one of the following statements opens a file for appending?