$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.
In reply to Re: HTML::Element newline character
by wfsp
in thread HTML::Element newline character
by usr345
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |