
just.marc.smith
New User
Aug 23, 2013, 6:42 AM
Post #1 of 3
(2658 views)
|
return text between <title>-tags from html
|
Can't Post
|
|
Dear users, I'm learning perl using a book PERL for beginners from geoffrey Sampson. I'm dedicated to start using PERL in my job. However, there is a task that needs to be done rather quick. I only got to the 50th page of the book and while I feel what I'm about to ask is probably a walk in the park for most of you, it's to complicated for me at this moment. Here's what I'd need. I have a file textfile containing hyperlinks. http://www.example.com/1 http://www.example.com/2 ... The perl script should open the first hyperlink, scan the html file for the <title>-tags, and write the words between the title tags after the hyperlink in the textfile containing the hyperlinks. After the script is done, the textfile should look like http://www.example.com/1 webpage one http://www.example.com/2 webpage two ... Edit: I forgot to mention that every html-page has the same structure. What would the code look like to do that? Would the script read the entire html-file or just the <title>-tags? I'm looking forward to the responses. Kind regards, Marc
(This post was edited by just.marc.smith on Aug 23, 2013, 6:55 AM)
|