Recently, I had the opportunity to use an anonymous array appropriately in my code. I put it in, it worked, and at the time I did that I understood, or at least I thought I understood, what it was doing and how it worked. But the more I looked at the code and the more I read about anonymous arrays (in this case) the less I understood. In fact, the information I have read so far has been left me wanting more.
So, my question is how do these work, internally I mean. I understand that I create the sturcture, it has no name which leaves it without a way to call it directly. This worked in my case because I was iterating over the same array and making it anonymous allowed it to "recreate" itself anew. But HOW does Perl understand this. It is hard to imagine that Perl can access any data structure without some sort of name associated with it. Is it just sort of a "natural reference" with a reference but no name, and if that is the case how does this get handled vis-a-vis the garbage handled alogrithms.
I realize this is an esoteric subject, and I am sure my writting skills don't do it justice, but it has plagued me on and off for a week, so I was hoping the wisdom of the monks could pull me through.
In reply to Anonymous Data Structures: How Do They Work? by jonjacobmoon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |