Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
P is for Practical
 
PerlMonks  

Re^3: Extracting HTML content between the h tags

by flexvault (Vicar)
on Aug 05, 2012 at 15:14 UTC ( #985534=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Extracting HTML content between the h tags
in thread Extracting HTML content between the h tags

p>vagabonding electron,

For the missing hr-tag, just test for $keyword after the 'while' loop:

if ( $keyword ) ## Same as if ( $keyword ne "" ) { print "$keyword\n"; }

Whenever I start a new project/gig, I try to think whether this is similar to something I've done before, and if it is, then I use that code or technique as the starting point. If it is totally new (very rare), I still have a bag of tricks ( subroutines ) that I copy ( use ... ) into the new work. Look at every thing you do today as something you may be able to use for the rest of your programming life.

You're lucky to have Perl, since a lot of the code I did before Perl is worthless today, but knowledge and techniques can be applied to Perl!

Good Luck!

"Well done is better than well said." - Benjamin Franklin


Comment on Re^3: Extracting HTML content between the h tags
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (11)
As of 2014-04-21 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (495 votes), past polls