|Perl: the Markov chain saw|
Passing a hash between subsby wil (Priest)
|on Jan 30, 2003 at 16:16 UTC||Need Help??|
wil has asked for the wisdom of the Perl Monks concerning the following question:
I've got a sub which calls another sub to generate and populate a hash. This parent sub then needs to use the hash generated in the child sub. Problem is, the parent sub doesn't seem to want to read the hash generated in the child sub correctly.
Here's my code:
$location_text returns sometimes nothing and othertimes a seemingly random value.
I've put Data::Dumper into the parent sub and have observed that the hash comes back into the parent sub correctly so I'm at a loss as to why I can't get at that data.
If I throw all the code into one sub and not try and split it into sub-subs, it all works as expected.
Anyone got any ideas what I might be doing wrong?