T
Tad J McClellan
[ Please excuse the piggyback. I don't see posts from cartercc ]
This is absolutely true. I've seen it many many times.
Two of the test questions that I like to use in interviews:
1)
What is the difference between my() and our()?
(followup if they get that right: What about local()?)
(followup if they have still not eliminated themselves:
When would you use one over the other?)
2) What is returned by mystery_func()?
sub mystery_func {
my @ra = 4;
push @ra, 2+3;
$ra[@ra] = 6;
return @ra;
}
I'll leave what is taken to be "the correct answer" as an
exercise for the reader...
Vicky Conlan said:According to <[email protected]>:
This is absolutely true. I've seen it many many times.
Two of the test questions that I like to use in interviews:
1)
What is the difference between my() and our()?
(followup if they get that right: What about local()?)
(followup if they have still not eliminated themselves:
When would you use one over the other?)
2) What is returned by mystery_func()?
sub mystery_func {
my @ra = 4;
push @ra, 2+3;
$ra[@ra] = 6;
return @ra;
}
I'll leave what is taken to be "the correct answer" as an
exercise for the reader...