in reply to How do I create non-breaking space ( ) with HTML::Element?
But the s/ //g did nothing. As marnanel said, the answer is to use HTML character entity references :my $tree = HTML::TreeBuilder->new_from_content( $m->content ) ; for ($tree->look_down( _tag => 'td', class => 'obsTempText' ) ) { my $bla = $_->as_trimmed_text ; $bla =~ s/ //g ; print $bla ; }
Then,my $NBSP = HTML::Entities::decode_entities(' ');
removed the non-breaking spaces.$bla =~ s/$NBSP//g ;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do I create non-breaking space ( ) with HTML::Element?
by etlamar (Novice) on Aug 12, 2012 at 12:59 UTC |