Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Programmatically building named anchors to warp to sections

by CountZero (Bishop)
on Aug 15, 2007 at 06:38 UTC ( #632660=note: print w/replies, xml ) Need Help??


in reply to Programmatically building named anchors to warp to sections

If you really have a lot of words starting with the same letter, then chances are good that you will effectively have a word at every one of your intermediary jump stations.

So I would not bother with a scheme which has to go twice through your list in order to build-up a navigation panel. It is a waste of cycles and memory. Just provide a navigation panel for all of "Pa", "Pe", "Pi", "Po", "Pu". It may be there is no item starting with "Po", but still include the anchor for "Po" where it should have been if there was a word with "Po". Perhaps there is a word starting with "Pr" and then your link is still quite close to the mark!

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

  • Comment on Re: Programmatically building named anchors to warp to sections

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://632660]
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: (7)
As of 2021-01-20 19:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?