I'm still not getting it, I'm afraid. Would this be defined at the top of a file, as in "here's a list of words and their associated links" or *within* the file, as in only certain occurrences of the words will get linked, and that link is determined by what follows the 'pipe' symbol.

Example #1

cult|http://www.slashdot.org banana|/orange.html Being in a cult can reduce your ability to eat a banana, doctors claim +.

Example #2

Being in a cult|http://www.slashdot.org can reduce your ability to eat + bananas|/orange.html , doctors claim.

if the latter, it's so close to HTML already it's almost not worth the work of writing a script. But whatever. If the former, what you could to do is read the word/url pairs into a hash, and do something like what I suggested above. Philosophy can be made out of anything. Or less -- Jerry A. Fodor


In reply to Re: Re: Re: Auto linking to words in a text file by arturo
in thread Auto linking to words in a text file by belize

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.