Which of the following choices demonstrates the correct syntax for creating a hash?
Consider the following lines of code:
$_ = "This is a test";
s/^([^ ]*)\s*([^ ]*)/$2 $1/;
print;
What is the output 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);
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 following program code:
@array = ("ALPHA", "beta", "GaMmA");
@array = sort(@array);
print("@array");
What is the output of this code?
In the context of Perl user-defined subroutines, which statement is the most accurate?
Consider the following command:
perl runme.pl arg1 arg2 arg3
Given this command issued on the command line, what is the value of @ARGV?
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?
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?