CIW 1D0-437 - CIW PERL FUNDAMENTALS
Which of the following choices demonstrates the correct syntax to pass a reference to a subroutine?
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?
Consider the following program code:
@array = ("ALPHA", "beta", "GaMmA");
sort(@array);
print("@array");
What is the output of this code?
Consider the following lines of code:
sub mySub {
$_ = @_[1];
$a = shift;
$b = shift;
return $a * $b * $_;
}
mySub(1,2,3);
What is the output of these lines of code?
The filehandle INPUT is associated with the file represented by $file. Which statement will close the filehandle INPUT?
Which of the following tasks is the least effective in reducing errors in Perl scripts?
Consider the program code in the attached exhibit. 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?
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?
Consider the following program code:
1.$x = 100;
2.$y = 15;
3.$result = $x % $y;
4.
5.print $result;
What is the result of executing this program code?
