Consider the following program code:
@array = (10, Masami, 10..13, Niklas);
for ($i = 1; $i < $#array; $i++)
{
print($array[$i] );
}
What is the result of executing this program code?
Which one of the following choices will assign the current package Library1?
Which of the following choices demonstrates the correct syntax to pass a reference to a subroutine?
Which of the following choices demonstrates the correct syntax for creating a hash?
Consider the following assignments:
$x = 9
$y = 7
$z = 5
Given these assignments, which one of the following expressions evaluates as true?
Consider the following program code:
$x = 0;
$y = 5;
do
{
print ($x $y );
}
while (++$x < 5 && ++$y < 10);
print ($x $y );
What is the result of executing this program code?
Assuming $a = 2, which of the following evaluates as false?
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 code:
%chars = ("a", "100", "b", "90", "c", "80");
Which one of the following choices will reverse the key/value pairing of the code?
Which one of the following statements opens a file for appending?