http://www.perlmonks.org?node_id=874128


in reply to Re^2: why need my in a foreach loop?
in thread why need my in a foreach loop?

The foreach loop always works with an alias. IMHO the variable is never connected to anything outside the for loop so the values never "leak" out of the loop. If I am mistaken, please give an example when that variable is connected to something else as well.