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


in reply to Re^2: Dereference string in foreach
in thread Dereference string in foreach

Thanks for that answer.
Though quite some time has passed since I last read the corresponding paragraph in perldoc, I wouldn't have expected that the reference still points to the variable outside of the loop since it is used within the loop.

All variables have been previouly defined using my (i.e. in the beginning of the script).