in reply to Hashes in Perl Modules

First and formost, you should be using strict:

use strict;

Which you are in the package but you should use it in the script as well.

You are declaring the KOLS attribute as an array and you're assigning an array into that attribute. You need to assign a hash reference into that attribute.

sub build_KOL { my($self) = @_; # for this example my %results = (); $results{1} = "blah1"; $results{2} = "blah2"; #instead of this... # $self->{KOLS} = %results; #store the reference to the results hash #in the attribute. $self->{KOLS} = \%results; } # end-sub


"Look, Shiny Things!" is not a better business strategy than compatibility and reuse.