in reply to Passing Hashes

Ok, you misspelled retrieve twice, but that isn't the main problem. To pass a hash, you have to pass its contents:
return (%dat); return ('user' => "ironcom", 'password' => "password"); -- %dat = retrieve->gather();
Or pass as a reference and then either use from the reference or dereference:
return \%dat; -- %dat = %{retrieve->gather()}; print $dat{'user'}; $ref = retrieve->gather(); print $ref->{'user'};
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:

 1;

Replies are listed 'Best First'.
Re^2: Passing Hashes
by ironcom (Initiate) on Oct 24, 2004 at 00:58 UTC
    Thanks Ted :-) the it seems to work now
    You've all been a big help. I generally don't code object type code, usually its simple shell scripting or administration scripts, so this is a little different for me.
    Thanks again
      "I generally don't code object type code"

      But that's not the point. Same rule applies here, which has nothing to do with OO:

      use Data::Dumper; use strict; use warnings; my $dat = do_this(); print Dumper($dat); sub do_this { my %dat = ("a", 1, "b", 2); return \%dat; }