Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

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.

Replies are listed 'Best First'.
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?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2016-10-22 16:05 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (297 votes). Check out past polls.