Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. use Mojo::DOM
  2. use v5.24;
  3.  
  4. # Example of Mojo::DOM (7.33) mungling   whitespaces
  5.  
  6. my $dom = Mojo::DOM->new('<div><h1>This is<span>&nbsp;Just Some&nbsp;Test</span></h1></div>');
  7. say $dom->content; # <div><h1>This is<span>Just SomeTest</span></h1></div>
  8. say $dom->at('h1')->all_text # This isJust SomeTest
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement