1. Which statement is wrong:
A. $_= ‘hello world’;
B. $a=’hello world’;
C. my $b,$a=’hello world’;
D. my ($a,$b)=(0,’hello world’);
Answer:
Item C: $b is empty and $a is ‘hello world’
All of items is correct in program syntax, and can run.
2. The expression should be ( ), then the following code can run correctly:
$a=0;$b=55;
while (expression)
{
$a+=2;
}
print "$a/n";
A. $a = $b
B. $a*$a <= $b
C. $a != $b
D. $b == 0
Answer: B
3. @array is an array variable, what is output of “print @array;” :
A. Each element of this array
B. The size of this array
C. The first element of this array
D. Nothing
Answer: A
4. “$a = @array;”, what is value of $a:
A. The first element’s value of this array
B. The size of this array
C. This line code