in reply to Hashes in Perl Modules
You're creating an object. An object is basically a special reference (in this case, and most other cases, a hash reference). A hash (whether it's a hash or a hash reference) can only contain scalar values or references as it's elements (same goes for arrays).
With this line:
$self->{KOLS} = %results;
You're attemping to assign a hash to an element. You really need to do this:
$self->{KOLS} = \%results;
You seem to have got the basic jist of objects in Perl, but I strongly recommend you read perlref before continuing.
|
|---|