Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Strip HTML line breaks from list of URLs

by diotalevi (Canon)
on May 08, 2003 at 20:06 UTC ( #256661=note: print w/ replies, xml ) Need Help??


in reply to Strip HTML line breaks from list of URLs

Two ideas: just snip them off with substr. $_ = substr $_, 0, length() - 4 for @Old_URL. Or use a a substitution: s{<br>}{} for @Old_URL.


Comment on Re: Strip HTML line breaks from list of URLs
Select or Download Code
Re: (2) Strip HTML line breaks from list of URLs
by Maclir (Curate) on May 09, 2003 at 19:47 UTC
    And what if the html source changes to xhtml and the <br>'s become <br />?

      Then it breaks. I didn't even pretend that the regex as given would parse HTML. It just alters a string which happens to have some HTML of a known format in it.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2015-07-06 23:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (85 votes), past polls