![]() |
|
Just another Perl shrine | |
PerlMonks |
Re: hash deref confusion: Intermediate Perlby davido (Cardinal) |
on Jul 30, 2012 at 06:38 UTC ( #984361=note: print w/replies, xml ) | Need Help?? |
Sometimes for me I find it more readable to place the inner reference in brackets, which sort of serves to remind me that it's a reference.
We already know $self is a hashref. What happens when you put an @ in front of a hash, and a pair of curly brackets after it? Let's look at the similar syntax, but first remove the reference indirection (and complexity):
That should ring a bell (you're looking at a hash slice). Dave
In Section
Seekers of Perl Wisdom
|
|