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:
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:
In this case, i used s### instead of s/// for two reasons:s/foo/stuff/ s#foo#stuff# s!foo!stuff! s?foo?stuff?
- 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#;
In Section
Seekers of Perl Wisdom