in reply to Re: symbolic references
in thread symbolic references
According to "Programming Perl 3rd", p 263:
What happens if you try to dereference a value that is not a hard reference? The value is then treated as a symbolic reference.
In the line:
goto &{"greet"};
"greet" is not a hard reference, so what happens when you try to dereference a value that is not a hard reference, e.g. {"greet"}? According to "Programming Perl", the string is treated as a symbolic reference. As far as I can tell, dereferencing the string "greet" is the very definition of a symbolic reference.
It's my understanding that my code tells perl to look in the symbol table for the name "greet" and return the appropriate part of greet's typeglob: the coderef part. On the other hand, a hard reference points directly at the data in memory so a hard reference doesn't need to access the symbol table to find the data.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: symbolic references
by Anonymous Monk on Jan 01, 2011 at 09:12 UTC |