You're right, it doesn't work.
Seriously, %hash is a lexical variable. The whole point of lexical variables is that they're not available outside of their scopes. %hash is scoped to the enclosing file.
The quick and dirty solution is to make %hash a global variable, probably with the vars pragma. I take issue with this comment, though:
But this is not possible in our real code.
It's just software. I change software all the time.
In reply to Re: variables across modules
by chromatic
in thread variables across modules
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |