jonjacobmoon has asked for the wisdom of the Perl Monks concerning the following question:
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Anonymous Data Structures: How Do They Work?
by orkysoft (Friar) on Jan 14, 2002 at 01:11 UTC | |
Re: Anonymous Data Structures: How Do They Work?
by Zaxo (Archbishop) on Jan 14, 2002 at 00:58 UTC | |
by orkysoft (Friar) on Jan 14, 2002 at 01:12 UTC | |
(Ovid) Re: Anonymous Data Structures: How Do They Work?
by Ovid (Cardinal) on Jan 14, 2002 at 01:38 UTC | |
Re: Anonymous Data Structures: How Do They Work?
by danger (Priest) on Jan 14, 2002 at 01:15 UTC | |
Re (tilly) 1: Anonymous Data Structures: How Do They Work?
by tilly (Archbishop) on Jan 14, 2002 at 10:44 UTC | |
Re: Anonymous Data Structures: How Do They Work?
by MungeMeister (Scribe) on Jan 14, 2002 at 21:47 UTC | |
Re: Anonymous Data Structures: How Do They Work?
by torin (Sexton) on Jan 15, 2002 at 05:18 UTC |