Without any explanation or example of what you expect to see, it's a bit hard to be sure just what it is you want. However the usual mantra Don't use regexen to parse markup seems applicable. Instead use a suitable module. HTML::TreeBuilder is a good starting point. Consider:
use strict; use warnings; use HTML::TreeBuilder; my $html = <<'HTML'; <TITLE><![CDATA[<p>Dogs may not smarter than 6-year-olds, but research +ers suggest canines might be on par with 2-year-olds.< Psychologist Stanle +y Coren says, "We do know that dogs understand far more than we credit them wi +th, from about 165 words to 250 words." Even better than understanding our word +s, dogs know our hand gestures and body postures. Dogs may, in fact, far excee +d 2-year-olds when it comes to reading emotions.<BODY><![CDATA[<p>Develo +pmentally, 2-year-olds are generally more interested in themselves, while dogs do + care how their people feel, and instantly recognize a change in emotion.< "Whil +e your dog can't comprehend that you just received a traffic violation, he can te +ll that you're upset the second you walk through the door," Coren says. "In fa +ct, dogs can detect some subtle changes which even adults can't," adds Coren. " +We can't smell cancer or predict seizures, as dogs can."< When I posted this st +ory on my Facebook Fan page recently (<a href="http://www.new.facebook.com/pages +/ Steve-Dale/50057343596?ref=ts">www.new.f acebook.com/pages/Steve-Dale/50057343596?ref=ts, or simply type Steve +Dale into the Facebook search), I received some interesting responses:< Kelle: " +Heck, my Italian Greyhound is smarter than most college students."< Karen: "Dep +ends on how you define smart. HTML my $tree = HTML::TreeBuilder->new; # empty tree $tree->parse ($html); $tree->eof (); for my $element ($tree->content_list()) { print $element->as_text (), "\n\n"; }
Prints:
Dogs may not smarter than 6-year-olds, but researchers suggest canines + might be on par with 2-year-olds.< Psychologist Stanley Coren says, +"We do know that dogs understand far more than we credit them with, f +rom about 165 words to 250 words." Even better than understanding our + words, dogs know our hand gestures and body postures. Dogs may, in f +act, far exceed 2-year-olds when it comes to reading emotions. Developmentally, 2-year-olds are generally more interested in themselv +es, while dogs do care how their people feel, and instantly recognize + a change in emotion.< "While your dog can't comprehend that you just + received a traffic violation, he can tell that you're upset the seco +nd you walk through the door," Coren says. "In fact, dogs can detect +some subtle changes which even adults can't," adds Coren. "We can't s +mell cancer or predict seizures, as dogs can."< When I posted this st +ory on my Facebook Fan page recently (www.new.f acebook.com/pages/Ste +ve-Dale/50057343596?ref=ts, or simply type Steve Dale into the Facebo +ok search), I received some interesting responses:< Kelle: "Heck, my +Italian Greyhound is smarter than most college students."< Karen: "De +pends on how you define smart.
In reply to Re: Some portion of the text missing
by GrandFather
in thread Some portion of the text missing
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |