RE: Using HTML::Parser question

2003-01-24 Thread Dan Muey
Perfect Thank you so much for the enlightenment! I will study that until I have it down pat! Thanks a million!!! Today you receive the genius award (Sorry Rob :P) Dan > > Dan Muey wrote: > > > > > print "body text: @body\n"; # this needs to keep the tags were they > > are** > > > > tha

Re: Using HTML::Parser question

2003-01-24 Thread Rob Dixon
Dan Muey wrote: > For clarity sake with all of the code and changes and stuff here is > the code that works mostly the way I want A virtue that - faith, hope and clarity. Sorry, /R -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Using HTML::Parser question

2003-01-23 Thread david
Dan Muey wrote: > > print "body text: @body\n"; # this needs to keep the tags were they are** > that' fairly easy to do: #!/usr/bin/perl -w use strict; use HTMP::Parser; my $text = < HI Title heaD STUFF keep the I tag hI HERE'S CONTENT i WANT IMaGE i DON'T WANT THIS SCRIPT EIT

RE: Using HTML::Parser question

2003-01-23 Thread Dan Muey
Those four points are exactly it btw. That script does 1,2, and 4, #3 is what it's not doing. Sorry about beinf so confusing with all of these posts! Hopefully this will clarify all of my babble. Thanks Dan > > Dan Muey wrote: > > > > > Very nice, although I'd like to keep html tags that ar

RE: Using HTML::Parser question

2003-01-23 Thread Dan Muey
Oops I just got your revised one. Sorry bout that! > > For clarity sake with all of the code and changes and stuff > here is the code that works mostly the way I want with the 3 > questions/problems/needs after the #'s, $text contains actual > html code: > #- > > # ge

RE: Using HTML::Parser question

2003-01-23 Thread Dan Muey
For clarity sake with all of the code and changes and stuff here is the code that works mostly the way I want with the 3 questions/problems/needs after the #'s, $text contains actual html code: #- # get $title - EG the 'Your Title Here' in :: Your Title Here # get $bdy_

RE: Using HTML::Parser question

2003-01-23 Thread Dan Muey
Almost perfect Instead of having an array of tags used in the body. I'd like to keep the tags in the body. IE print "title is: @title\n"; # perfect print "body text: @body\n"; # this needs to keep the tags were they are** print "body attr.:\n"; # perfect while(my($k,$v) = each %body_attr){

RE: Using HTML::Parser question

2003-01-23 Thread david
Dan Muey wrote: > > Very nice, although I'd like to keep html tags that are between the body > tags as well except script & comment. > > Also @body contains the attributes of the body tag as well as all of the > text in the body : > > my $new_title = join '', @title; > my $new_body_atts = join(

RE: Using HTML::Parser question

2003-01-23 Thread Dan Muey
Very nice, although I'd like to keep html tags that are between the body tags as well except script & comment. Also @body contains the attributes of the body tag as well as all of the text in the body : my $new_title = join '', @title; my $new_body_atts = join(//,@body); print "TITLE -$new_ti

RE: Using HTML::Parser question

2003-01-23 Thread Dan Muey
Sweet! Thanks. I'll give her a try and study it to understand it better. Thanks! Dan > Dan Muey wrote: > > > > > #Q) Before I kill the head section or body tags below how do I grab > > these #parts of it? 1 - my $title = IE the text between title > > tags #2 - get body tag attributes m

Re: Using HTML::Parser question

2003-01-23 Thread david
Dan Muey wrote: > > #Q) Before I kill the head section or body tags below how do I grab these > #parts of it? 1 - my $title = IE the text between title tags > #2 - get body tag attributes my $body_attributes = IE in this example > #it'd be 'bodytag=attributes' > grabs the title and bo

RE: Using HTML::Parser question

2003-01-23 Thread Dan Muey
> Using the excellent example in the an earlier post from david: > RE: Removing HTML Tags > > I came up with this slightly modified version based on the > post and some cpan documentation and it works. > It just brought up a few more questions. > Basically I'm just trying to grab the body cont