Thanks for your help. I stubled over a solution in perlop. Any non-alphanumeric non-whitespace character can be used in place of the forward slash in s///. I'm using s%%%(those are percentage signs) now and things are going well. I haven't looked into the parser modules yet.
Thanks again, Cy Kurtz On Tue, 2005-06-07 at 09:50 -0400, Chris Devers wrote: > On Tue, 7 Jun 2005, Cy Kurtz wrote: > > > OK ... Remember you asked for it. > > Right. Because without sufficient context, it's impossible to give an > adequate answer to a wildly open-ended question. Make sense? > > > I have at least a dozen files that I want to update. I want to do > > this: > > > > [EMAIL PROTECTED] somedirectory]$ perl -pi~ -e > > 's/./officers-gasenate.html/http://www.legis.state.ga.us/cgi-bin/peo_list.pl?List=stsenatedl/' > > ./contactus.html > . <snip> . > > Note though that it's standard to point out here that HTML is > notoriously difficult to get right with regular expressions. If all > you're doing is changing the href target of known anchor tags in a > limited set of files that you have control over, it's probably fine to > solve it this way, but if the HTML is at all complicated -- that is, if > it has any inconsistencies at all, broken tags, etc -- you're much > better off solving this kind of problem with a parser module from CPAN. > > There's a lot of them to choose from, depending on your needs, but > almost any of them are a better choice than doing this kind of thing by > hand with regular expressions: it's easier, faster, and more robust. > > Keep it in mind if this problem starts getting more complicated... > > > > -- > Chris Devers > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>