in reply to our/my inconsistency.
Accessing global vars between different files can be a bad or troublesome practice. If you want to change the name of the variable or want to perform the same action on two different hashes, you will need to edit multiple files referencing these global hashes, creating more work and errors which may not be detected and fixed easily.
Instead you can pass the hash by reference to a subroutine in the other file(s) so you can maximise code reuse and only need to maintain one copy of the variable name, and eventually generate more flexibility.
|
|---|