in reply to hash deref confusion: Intermediate Perl
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.
@{$self}{ qw( wins places shows losses ) } = ....
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):
@somehash{ qw( wins places shows losses ) } = ....
That should ring a bell (you're looking at a hash slice).
Dave
|
---|
In Section
Seekers of Perl Wisdom