I am trying to get the data between
. I am using this code it is fine but when i don't have class in
then content with in p is not coming my code is:
use strict;
use warnings;
use HTML::TreeBuilder;
my $str = do {local $/; };
my $tree = HTML::TreeBuilder->new;
$tree->parse ($str);
my @jobs;
for my $para ($tree->find ('p')) {
my @class = $para->look_down ('class', 'MsoNormal');
next unless @class ;
my $job = $class[0]->as_text ();
push @jobs, $job;
}
print join "\n", @jobs;
__DATA__
< p class="MsoNormal" >In an effort to secure federal funding, Washington Gov. Chris Gregoire (D) and Oregon Gov. John Kitzhaber (D) jointly backed a 10-lane deck truss bridge as their choice for the proposed Interstate 5 Columbia River Crossing connecting Portland, Ore., and Vancouver, Wash. Gregoire said during a press conference that by making the announcement now the two states “ensure the best chance” of gaining $1.3 billion in federal funding—$400 million in federal highway discretionary funding and $850 million in Federal Transit Administration New Starts funding—and can stay on track to break ground on the $3.6 billion project in 2013.< /p >
< p class="MsoNormal" >A design committee had recommended a double-deck, open-web girder design in 2010, but an independent review cited the design as too costly ($440 million for the bridge) and too risky, instead suggesting either a cable-stay ($400 million), tied-arch ($430 million) or deck truss ($340). The governors chose the deck truss to save on extra design costs and keep the project on schedule, even if not as aesthetically advanced. The design needs finalizing with the goal of receiving a< /p > < p > week, with local political leaders criticizing the choice as "irresponsible" and the agency defending< /p >
< p class="MsoNormal" >*< /p >
i go out put like:
In an effort to secure federal funding, Washington Gov. Chris Gregoire (D) and Oregon Gov. John Kitzhaber (D) jointly backed a 10-lane deck truss bridge as their choice for the proposed Interstate 5 Columbia River Crossing connecting Portland, Ore., and Vancouver, Wash. Gregoire said during a press conference that by making the announcement now the two states “ensure the best chance” of gaining $1.3 billion in federal funding—$400 million in federal highway discretionary funding and $850 million in Federal Transit Administration New Starts funding—and can stay on track to break ground on the $3.6 billion project in 2013.
A design committee had recommended a double-deck, open-web girder design in 2010, but an independent review cited the design as too costly ($440 million for the bridge) and too risky, instead suggesting either a cable-stay ($400 million), tied-arch ($430 million) or deck truss ($340). The governors chose the deck truss to save on extra design costs and keep the project on schedule, even if not as aesthetically advanced. The design needs finalizing with the goal of receiving a
but i want the data with in < p > tags i.e., the data in
< p > week, with local political leaders criticizing the choice as "irresponsible" and the agency defending< /p >
can any one help me to do this.
thanks in advance.