in reply to Re^2: Modifying/Accessing hash in separate script
in thread Modifying/Accessing hash in separate script
Well, in this case, yes, using the our function (instead of my) does make sense, it can make the variable available in both code files. Sorry if my previous answer was wrong, I did not understand the full context.
Although, to tell the truth, I am almost never using our to share variables between different compile units. I tend to prefer to create setter and accessor functions and to export explicitly these subroutines, rather than the variables.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Modifying/Accessing hash in separate script
by mdskrzypczyk (Novice) on Jul 23, 2015 at 13:15 UTC |