in reply to Linked-list Style Data Structure

If the data were more structured, I'd look at marshalling it as XML, and using XML::XPath for queries and updates. This would let you find pages based on name to get the "next" or "previous" pages trivially, including doing inserts and rewriting the XML to your marshall file if you need. You could also find associated data by storing it deeper in the same node:
<pages> <page ident="first page" /> <page ident="second page"> <validation type="numeric"/> </page> <page ident="third page" /> </pages>
This would be a simple format to edit, and to process electronically.

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Re: &bull;Re: Linked-list Style Data Structure
by impossiblerobot (Deacon) on Oct 07, 2002 at 13:08 UTC

    Thanks, merlyn. Although it seems a little heavy for this particular application, it is a useful approach that I had not considered and might find a use for.


    Impossible Robot