Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
It just means that given $array_ref = [qw/bar baz/] $$array_ref[0] is the same as $array_ref->[0] Similarly, given $hash_ref = { bar => 'baz' } $$hash_ref{bar} is the same as $hash_ref->{bar} I've traditionally preferred the double-sigil style, mostly because I strongly disliked the arrow syntax when I first started coding Perl. I think though it is generally regarded as bad because it isn't quite so explicit, and I admit my own opinion on the matter is gradually shifting toward the arrow. Another example:
Here the reference is a value in a hash that points to an array which must be dereferenced before being passed to push
In reply to Re: Dereferencing and comment from Camel
by djantzen
|
|