Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Parsing HTML

by ww (Bishop)
on Jun 07, 2012 at 13:13 UTC ( #974936=note: print w/replies, xml ) Need Help??


in reply to Re^2: Parsing HTML
in thread Parsing HTML

For a start, you might want to use split ( split ) to break up $trip into its elements. But your recent sample-output-desired post involves additional data (for example, "Trip Name"...) which I ignored in checking the original .html. Therefore (among other reasons), I'm not sure that
     /<\/span>\n<span>/
is an appropriate pattern for split.

Even if so, you'll still have to hard-code some punctuation (such as the colons in the subheads) and, perhaps, the newlines.

The previous newline suggestion was based on the output you showed with multiple itineraries as a single line.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://974936]
help
Chatterbox?
[kschwab]: shades of "pimp my ride"
[LanX]: unusual that "Pimp my Bride" never made it into TV (?)

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (10)
As of 2017-03-27 15:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (320 votes). Check out past polls.