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);
Consider the following lines of code:
@array1 = ("apples", "oranges", "pears", "plums"); foreach (@array1)
{print "$_\n"};
What is the result of these lines of code?
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?
Consider the following program code:
@array = ("ALPHA", "beta", "GaMmA");
sort(@array);
print("@array");
What is the output of this code?
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:
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?
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?