But this still isn't doing what you are expecting. Not declaring those two variables would produce the same result (given the amount of code you have given). A local block is making a local copy of those global variables for use inside the block, but you are altering and accessing both variables outside of the block... It may behave as you expect, but it isn't doing what you think it is.
Update: When I said copy, I didn't mean the global values are retained. Wrong use of the word. I meant 'reset for use inside of the block.'
In reply to Re^6: The weirdest problem with undef
by perlguy
in thread The weirdest problem with undef
by insaniac
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |