have a look in perlrefsub build_KOL { my($self) = @_; # for this example $self->{KOLS}->{1} = "blah1"; $self->{KOLS}->{2} = "blah2"; #alternatively written as #$self->{KOLS} = { 1=>"blah1", 2=>"blah2" }; #or #my %KOLS = ( 1=>"blah1", 2=>"blah2" ); #$self->{KOLS} = \%KOLS; } # end-sub sub get_all_KOLS { my ($self) = @_; return %{$self->{KOLS}}; } # end-sub
In reply to Re: Hashes in Perl Modules
by holli
in thread Hashes in Perl Modules
by rsiedl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |