RE: linked list in perl

2006-09-20 Thread Thomas Bätzler
Christian Stalp <[EMAIL PROTECTED]> asked: > 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

Re: linked list in perl

2006-09-20 Thread Tom Phoenix
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. Wh

linked list in perl

2006-09-20 Thread Christian Stalp
Hello out there, 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. Has anybody an idea how to make it

linked list

2005-01-21 Thread Christian Stalp
Hello again, I still have some questions concerning the linked list. The problem now is, that I try to access the head-pointer of the list after I left the loop in which the list were made. #!/usr/bin/perl use warnings; use strict; use Data::Dumper; use constant NEXT => 0; use constant

linked list again.

2005-01-18 Thread Christian Stalp
Hello again, I still have some questions concerning the linked list. The problem now is, that I try to access the head-pointer of the list after I left the loop in which the list were made. #!/usr/bin/perl use warnings; use strict; use Data::Dumper; use constant NEXT => 0; use constant

RE: linked list

2005-01-11 Thread Thomas Bätzler
Christian Stalp <[EMAIL PROTECTED]> asked: > Does anybody has any experience with making liked lists in perl. Perl's arrays are really linked lists - check out the built-in function splice(). HTH, Thomas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTEC

RE: linked list

2005-01-10 Thread Bob Showalter
Christian Stalp wrote: > Does anybody has any experience with making liked lists in perl. > There is an example in "Mastering Alogrithms in Perl" by Orwant, > Hietaniemi and Macdonald. But this works does'nt work: > > #!/usr/bin/perl > > use warnings; > use strict; > > use constant NEXT => 0; >

linked list

2005-01-10 Thread Christian Stalp
Does anybody has any experience with making liked lists in perl. There is an example in "Mastering Alogrithms in Perl" by Orwant, Hietaniemi and Macdonald. But this works does'nt work: #!/usr/bin/perl use warnings; use strict; use constant NEXT => 0; use constant VALU => 1; my ( $list, $tail )

Creating a Linked list package

2002-03-27 Thread Naomi Arries
Hi Please asssist. I have construct a few Linklist subroutines see attached file. I want to move these subroutines in to a package Queue::LList 1) Queue must be a subdirectory containing file LList.pm 2) Want to create package and test it using the test calls in attached file. 3) Need to

Re: How Do I Implement an Array or Linked List of Pointers in Perl?

2001-07-17 Thread Paul
--- Chuck Morford <[EMAIL PROTECTED]> wrote: > I think I read somewhere that when I store a Reference in an Array it > gets converted to a String and can no longer be used as a > Reference...Is that right? opps -- I misread this in my initial answer. Using a reference in a string context will co

Re: How Do I Implement an Array or Linked List of Pointers in Perl?

2001-07-17 Thread Brett W. McCoy
On Tue, 17 Jul 2001, Chuck Morford wrote: > And about Pascal's Record Type. Is there anything equivalent in Perl > without getting into OOP? Linked lists are really not necessary in Perl since you can do cool things with lists that you can't do in Pascal or C. However, I think for what you are

How Do I Implement an Array or Linked List of Pointers in Perl?

2001-07-17 Thread Chuck Morford
n array or linked list (depending on how much time I wanted to spend coding) of pointers to dynamically allocated records...Then I could use the array or list to traverse lists of objects (things, not OOP) in the game world, and read their properties and so forth by dereferencing the pointers... H