Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 contemplating the Monastery: (11)
As of 2014-09-22 18:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (198 votes), past polls