Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: 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 reply to Re: hash deref confusion: Intermediate Perl
by Anonymous Monk
|
|