in reply to returning a hash from a module
If you have a hash %some_hash and want to return it from anywhere you need to have a hash to put it in. Example:
Now if you want to use a a hash reference| hand waving here. my %reciever = get_stuff(); | more handwaving sub get_stuff { my %hash =(); # fill hash return %hash; }
Clear as mud?my $reciever=get_stuff(); sub get_stuff { my %hash = (); # yada yada return \%hash;
|
|---|