What's going to happen if you run the following:
Possible Answers:use strict; my $rv = 42 for (1); print "$rv\n";
(a) strict will complain because my $rv is technically enclosed in a for block, rendering $rv in the print statement a global.
(b) $rv will be set to 42 after the for loop, so the print statement will print 42.
(c) Neither (a) nor (b).
Who gets it?
In reply to my Scope Pop Quiz by saintmike
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |