explicitly dereferencing the $self reference. In the sub that doesn't work you use$self->{}
which implies that $self is a hash itself and not a reference -- thus making your use strict; complain about an undefined global hash called %self.$self{}
As a side note I'd suggest dropping the double quotes in your hash keys -- they're not necessary and they force interpolatin where none is necessary (even if you needed interpolation you wouldn't need quotes there).
In reply to Re: My first Perl module...
by snax
in thread My first Perl module...
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |