I'm not familiar with linked lists, and have never used them. They don't seem to be worth the trouble (normal Perl arrays work well enough). For wizardish web applications, I often just use numeric indexes (internally mapped to page names), or I store only the next page's name and let the browser handle the history.back(). Even iterating over an array each time would be more efficient than building a large data structure, I think.
Your list thingy would be quite a bit faster if you used arrays instead of hashes for saving the NEXT and PREVIOUS. You can use constants for array indexes to maintain readability.
- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.
In reply to Re: Linked-list Style Data Structure
by Juerd
in thread Linked-list Style Data Structure
by impossiblerobot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |