Hi,
I am writing a program in perl which opens and reads a html file and removes unnecessary tags.
For example if an html file has...
<html>
<title>this is the title</title>
<body>
<b>this is a bold text.</b><b>this is also a
bold text</b>
</body>
</html>
Since there are unnecessary bold tags..I mean it can also be written as <b>this is a bold text.this is also a bold text</b>
Please tell me if I am on the right track...
I read the html file line by line.
On each line when I encounter <b> tag I take the line into a temp string until I approach </b> tag...and I keep searching for any other string after that which uses the <b>immediately after this. I can make separate subroutine to remove the unnecessary <b> tags.
Or should I read file by per charcter encounter. I am fairly new to perl. Please advise me.
i got it working.
this thread can be closed now.
i will try to post the part of t his code sometime for some else's use
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks