http://qs321.pair.com?node_id=984362


in reply to hash deref confusion: Intermediate Perl

But, in the next line, "@$self" is syntax for dereferencing an array reference, not a hash reference!

Its both; to quote myself:

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