in reply to passing @ to sub and getting back hash
"Return a hash" seems to mean different things to different people. Maybe you want return %enc;, which actually returns a list of alternating keys and values, not a hash at all, or maybe you want to return \%enc;, which returns a hashref. In either case, the caller needs to know what is going to come back and be doing the right thing with it. Your caller example is expecting a list, not a hashref.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: passing @ to sub and getting back hash
by convenientstore (Pilgrim) on Dec 31, 2007 at 21:17 UTC |