in reply to My first Perl module...
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).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: My first Perl module...
by Anonymous Monk on Nov 17, 2000 at 14:24 UTC | |
by t0mas (Priest) on Nov 17, 2000 at 14:33 UTC | |
by snax (Hermit) on Nov 17, 2000 at 16:50 UTC | |
by Fastolfe (Vicar) on Nov 17, 2000 at 20:14 UTC |