![]() |
|
good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: hash deref confusion: Intermediate Perlby Anonymous Monk |
on Jul 30, 2012 at 06:40 UTC ( #984362=note: print w/replies, xml ) | Need Help?? |
But, in the next line, "@$self" is syntax for dereferencing an array reference, not a hash reference! This is called a hash slice , and in a quirk of perl syntax uses the @ sigil instead of % my %foo; @foo{ 'hash', 'slices' } = ( 'use', 'curly braces' ); my @bar; @bar[ 1,2,3,4 ] = ( 'array', 'slices', 'use', 'square brackets' ); See also References quick reference
In Section
Seekers of Perl Wisdom
|
|