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:
my @myarray = @{ $aref } ; my %myhash = %{ $href } ;
The other use is to reference a hash value by means of its key:
my $hash_value = $myhash{ $keyA } ;
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 reply to Re: Tutorial RFC: Guide to Perl references, Part 1
by djrosenblatt
in thread Tutorial RFC: Guide to Perl references, Part 1
by stevieb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |