On 9/20/06, Christian Stalp <[EMAIL PROTECTED]> wrote:

I need a Tipp how I can create a linked ring-list in Perl. I know well
that arrays in Perl are already realized as linked list, but what I need
is a ring-list. Means that at the last element owns a reference to the
first element.

What are you trying to do that Perl's arrays won't solve the problem?

It's a simple matter to make a series of elements (say, anonymous
hashes) in which each holds a reference to the next one in a ring.
It's a little harder to ensure that these elements are properly
garbage collected at the right time. It's nearly always easier to use
an array and write code that "knows" that the array is a ring.

Have you looked on CPAN yet?

Hope this helps!

--Tom Phoenix
Stonehenge Perl Training

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to