in reply to Re: HTML Parsing /Regex Qstn
in thread HTML Parsing /Regex Qstn

Thanks Roman. And i will make sure i put the code tags next time. Thanks again all of you!

Replies are listed 'Best First'.
Re^3: HTML Parsing /Regex Qstn
by planetscape (Chancellor) on Jan 22, 2010 at 01:02 UTC

    Yes, do keep <code>...</code> tags in mind for next time... but there is absolutely no reason you can't go back right now and edit your prior post.

    HTH,

    planetscape
Re^3: HTML Parsing /Regex Qstn
by sri1230 (Novice) on Jan 21, 2010 at 17:06 UTC
    Roman - One more question.. How do i get the content directly inside the div tag..the stuff that is'nt in any of those inner tags?
      You can traverse content_list of any element. Text is plain, while other tags are references.
      ... for my $part ($div->content_list) { print $part,"\n" if !ref($part); } ...
      If you want all text (including inner tags), you can use as_text method of elements. In this case it would also return title and date, but generally it is useful.

      --Roman

        Thanks!