in reply to Re^2: code sample: possible improvements
in thread code sample: possible improvements
Well, there's no list there. A basic linked list is a list where one element contains data, as well as a pointer to the next element. The next element contains data, and a pointer to the next element, and so on.
If you're really interested in linked lists, most textbooks on Computer Science discuss them at one point or another. If you're interested in implementing a linked list in Perl, I recommend the book, Mastering Algorithms with Perl (the Wolf book), published by O'Reilly & Associates. It has a chapter devoted to linked lists, and gives a pretty good discussion of other types of complex datastructures too. It's not really a beginning Perl book. If basic Perl is what you're looking for, start with reading Perl's own POD. For example, perlreftut, and perldsc discuss datastructures and references. But if you're kind of beyond that level and ready for more then try the algorithms book, it's pretty interesting.
Dave
|
|---|