yacoubean has asked for the wisdom of the Perl Monks concerning the following question:
I have a 'website' that is documentation for a largish ColdFusion Intranet application I'm in charge of. Each page of the site is documentation for one page of the ColdFusion app. So there are 135 ColdFusion pages and thus 135 HTML doc pages. I would like to add a section to each HTML doc page that displays every ColdFusion page that links to the particular CFM page documented. I already have a section on each HTML page that shows all of the page that each CFM pages links to, but not which pages link to each individual page. An example would probably help:
ColdFusion pages:
a.cfm, b.cfm, c.cfm
Docs pages:
a.html, b.html, c.html
In a.html there's a section that says that a.cfm links to b.cfm and c.cfm. The perl code I want would tell me which pages link to b.cfm, in this case a.cfm. Repeat that operation for all 135 HTML pages.
I already know enough Perl to be able to open and parse HTML files. So my plan is to make a script that will search the 135 HTML files for all pages that link to a particular page and spit that list out. But it doesn't seem very elegant because I'd be searching the 135 pages 135 times, once for each page. I don't want you to hold my hand and write all the code for me, I'm just looking for general advice to point me in the write direction before I embark on this journey.
Janitored by Arunbear - retitled from 'I've climbed the mountain to speak with the Oracle.', as per Monastery guidelines
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Checking links between web-pages
by radiantmatrix (Parson) on Oct 13, 2004 at 16:02 UTC | |
by yacoubean (Scribe) on Oct 13, 2004 at 16:42 UTC | |
|
Re: Checking links between web-pages
by Random_Walk (Prior) on Oct 13, 2004 at 15:32 UTC | |
by yacoubean (Scribe) on Oct 13, 2004 at 16:37 UTC | |
|
Re: Checking links between web-pages
by pizza_milkshake (Monk) on Oct 13, 2004 at 15:12 UTC | |
by yacoubean (Scribe) on Oct 13, 2004 at 15:58 UTC | |
|
Re: Checking links between web-pages
by TedPride (Priest) on Oct 13, 2004 at 20:07 UTC |