yes, $self is a reference to an anonymous hash which itself contains an anonymous array: PERRS => []. The use of references allows perl to use complex data structures.
To expand on Tony's answer, %$self or %{$self} is the syntax used to dereference a reference (a hash in this case) so you can get to the data. The reference is just an address in memory where the data can be found, so perl uses the reference to go fetch that particular bit of data from memory, but you have to dereference the reference to actually use the data in the script. The dereference type tells perl what kind of data to expect: a scalar, a hash, an array, or even a sub routine.
I don't beleive PHP has this capability yet, so it will seem strange at first, but it is a powerful tool that will allow you to create data structures that are very useful and versatile.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.