in reply to Passing Hashes
Or pass as a reference and then either use from the reference or dereference:return (%dat); return ('user' => "ironcom", 'password' => "password"); -- %dat = retrieve->gather();
I would personally go with the reference method or passing the data directly. Oh yes, and your module will give errors if you don't end it with a returned true, whatever the heck that means. Add the following to the end of your module:return \%dat; -- %dat = %{retrieve->gather()}; print $dat{'user'}; $ref = retrieve->gather(); print $ref->{'user'};
1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Passing Hashes
by ironcom (Initiate) on Oct 24, 2004 at 00:58 UTC | |
by pg (Canon) on Oct 24, 2004 at 01:11 UTC |