in reply to HTML::Element newline character
From the docs:
$h->as_trimmed_textHere, "collapsed" means replaced with one space (just as a browser would). So, as_text may do what you want. I would be worried about how consistent the (text part) of the HTML is though. I think I might consider another approach to "reliably get the city name".
This is just like as_text(...) except that leading and trailing whitespace is deleted, and any internal whitespace is collapsed.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: HTML::Element newline character
by usr345 (Sexton) on Jul 10, 2011 at 19:57 UTC | |
by Anonymous Monk on Jul 10, 2011 at 20:22 UTC | |
by usr345 (Sexton) on Jul 11, 2011 at 08:28 UTC | |
by GrandFather (Saint) on Jul 11, 2011 at 01:18 UTC | |
by usr345 (Sexton) on Jul 11, 2011 at 08:31 UTC |
In Section
Seekers of Perl Wisdom