loop surpriseby morgon (Priest)
|on Apr 03, 2018 at 13:23 UTC||Need Help??|
morgon has asked for the wisdom of the Perl Monks concerning the following question:
can someone explain this behaviour to me:
I had expected that within the loop the previously declared variable would be used and with each iteration it would be assigned a new value, so that after the loop it should have the new value 7.
But that's not how it works.
The loop does not seem to change the value of $i at all - but why?