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 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);
Which of the following is a valid subroutine name?
Consider the following program code:
$val = 5;
if ($val++ == 6)
{
print("True ");
}
else
{
print("False ");
}
if ($val++ == 6)
{
print("True ");
}
else
{
print("False ");
}
What is the output of this code?