Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Efficient Linked Lists

by Ionizor (Pilgrim)
on Jan 31, 2003 at 20:49 UTC ( #231716=note: print w/ replies, xml ) Need Help??


in reply to Re: Efficient Linked Lists
in thread Efficient Linked Lists

The goal is to create a set of static HTML pages with previous and next links to move from file to file, so it's not straight iteration (Note to self: Think while typing). I need to print out the filename, then a link to the previous filename, then a link to the next filename.

I think a reverse lookup table will do the job nicely. Thanks.

--
Grant me the wisdom to shut my mouth when I don't know what I'm talking about.


Comment on Re^2: Efficient Linked Lists
•Re: Re^2: Efficient Linked Lists
by merlyn (Sage) on Jan 31, 2003 at 23:46 UTC
    I think a reverse lookup table will do the job nicely. Thanks.
    A whuh?

    Sounds like just a simple list, again. As four or five answers in this thread have already said. What requirement prevents you from using the code that has been posted four or five times?

    Do not construct a doubly linked list. People build those things because they don't have perlfunc:splice, so in Perl, it's almost always the wrong way to go.

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.

      What I currently have is a function using jdporter's code above (which he described as a lookup table) that will look up the previous or next filename. Is this the code you're talking about or am I missing something?

      --
      Grant me the wisdom to shut my mouth when I don't know what I'm talking about.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://231716]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2014-11-23 04:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (128 votes), past polls