in reply to Re^2: Variable in a foreach loop
in thread Variable in a foreach loop

Thanks haukex, I got there eventually, I just had to tweak the code so it would run to see that behavior and understand what ravi45722 was trying to point out. I would have been confused too if I had tried that and not dug through the foreach documentation, I always use my and explicitly update variables at a higher scope with assignments inside the loop body, so I've never seen this behavior before.

I love it when things get difficult; after all, difficult pays the mortgage. - Dr. Keith Whites
I hate it when things get difficult, so I'll just sell my house and rent cheap instead. - perldigious