Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: HTML::Element newline character

by GrandFather (Saint)
on Jul 11, 2011 at 01:18 UTC ( [id://913646]=note: print w/replies, xml ) Need Help??


in reply to Re^2: HTML::Element newline character
in thread HTML::Element newline character

As the replies you've already had hint, but perhaps don't make explicit enough, white space (including line breaks, tabs, spaces, etc.) is special in HTML in that it is largely ignored. In general any amount of adjacent white space in HTML can be replaced with a single space. HTML is not an appropriate way to store information that depends on white space for interpretation!

Where does the HTML you are trying to process come from? It would be better to either structure the data in a table if you must use HTML, or use a format appropriate to managing the data such as csv.

True laziness is hard work

Replies are listed 'Best First'.
Re^4: HTML::Element newline character
by usr345 (Sexton) on Jul 11, 2011 at 08:31 UTC

    I have to parse HTML and can't use CSV.

    I solved the problem, using the code, suggested in the 3-rd reply.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://913646]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2024-04-16 08:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found