There's no need for copying. You can use a reference to the original array:my @listeners = @_; # assuming that's what you want $self->{'Listeners'} = [@listeners]; # hash value must be scalar
A small thing, but something worth keeping in the back of your mind.$self->{'Listeners'} = \@listeners;
In reply to Re: Re: Anonymous Scalar Ref to Hash?
by bart
in thread Anonymous Scalar Ref to Hash?
by acalbazana
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |