Thanks for the clarification about the way the reference is used. The code I supplied is an example and in reality %hash would be the result of another sub call, so I can't pass by value. As I need to then call other subs with \%hash as an argument (some of which need to modify %hash), I'll need to find another way.
In reply to Re^2: Global variable unexpectedly modified when passed by reference
by fshrewsb
in thread Global variable unexpectedly modified when passed by reference
by fshrewsb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |