Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Word HTML issues

by davidrw (Prior)
on May 15, 2005 at 21:07 UTC ( #457296=note: print w/replies, xml ) Need Help??


in reply to Word HTML issues

    How does that script work with all the # in it?

First, please don't replace your original content like that (i think the editors are going to fix it)--just reply to the replies instead..

Anyways, i think you're asking about my usage of things like s#foo#stuff# Because of how the operators (see perlop and perlre man pages), all of these are do the same thing:
s/foo/stuff/ s#foo#stuff# s!foo!stuff! s?foo?stuff?
In this case, i used s### instead of s/// for two reasons:
  • The # is pretty legible since it's visually a block.
  • Since i'm dealing w/html tags, i don't have to worry about escaping /'s. For example, these two are identical, but one is obvisouly easier to read & write:
    s/<tr><td>.*?<\/td><\/tr>/FOO/; s#<tr><td>.*?</td></tr>#FOO#;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2021-01-19 18:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?