in reply to references to arrays. I don't really get it I guess...
As others have said, you need to put curly braces around $self->{array} so that the @ dereferences the correct thing. @$self->{array} is equivalent to @{$self}->{array} as Perl will dereference the simple scalar or BLOCK that follows the @. In my code I almost always put the braces even for the simple cases just so that there is no ambiguity. So, again, @{$self->{array}} is what you want.
|
|---|