Don't ask to ask, just ask | |
PerlMonks |
Re: Tutorial RFC: Guide to Perl references, Part 1by djrosenblatt (Initiate) |
on May 03, 2019 at 17:01 UTC ( [id://1233323]=note: print w/replies, xml ) | Need Help?? |
Thank you for this tutorial. You've helped clear up one thing that has probably caused me some confusion when reading others' Perl code, which is that the curly braces have two different purposes. One is to dereference arrays and hashes. For example:
The other use is to reference a hash value by means of its key:
But is there some consistent logic to this? That is, does the internal Perl logic consider a key of a hash to essentially be a reference to the storage holding its associated value? And are there any other "gotchas" in Perl that typically cause confusion in newbies? Thanks!
In Section
Meditations
|
|