| Public Scratchpad | Download, Select Code To D/L |
Can anyone explain this to me, in a manner that I can understand, please?
Why does this:
Give:my $var; my @vars = qw(one two three); for $var (@vars) {subroutine()}; sub subroutine {print "var is $var\n"};
Gives this:my $var; my @vars = qw(one two three); for (@vars) {$var = $_; subroutine()}; sub subroutine {print "var is $var\n"};
It's making my head hurt! :-)