Re: Substituting string in many files

2007-04-07 Thread Ricky Zhou
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mário Gamito wrote: > My question is how do i change all ocorrences of the string ".html" to > ".php" inside all the files to change the links for all pages in a snap ? Awww, use Perl to change the links, but use PHP for server-side scripting, huh? :(

Substituting string in many files

2007-04-07 Thread Mário Gamito
Hi, I have thos huge site that is (was) all in .html files. I've made it dinamyc in PHP and changed all the filename extensions from .html to .php My question is how do i change all ocorrences of the string ".html" to ".php" inside all the files to change the links for all pages in a snap ? I've

Substituting string in many files

2007-04-07 Thread Mário Gamito
Hi, I have thos huge site that is (was) all in .html files. I've made it dinamyc in PHP and changed all the filename extensions from .html to .php My question is how do i change all ocorrences of the string ".html" to ".php" inside all the files to change the links for all pages in a snap ? I've

Re: Text munging problem

2007-04-07 Thread D. Bolliger
John W. Krahn am Samstag, 7. April 2007 01:05: > D. Bolliger wrote: > > Chas Owens am Freitag, 6. April 2007 13:27: [snip > $ perl -e' > use Benchmark q[cmpthese]; > my $wordlist = qx[cat /usr/share/dict/words]; > cmpthese -10, { > twomaps => q{ join " ", map ucfirst, map lc, split " ", $wordli

Re: Text munging problem

2007-04-07 Thread Glenn Booth
Hi, Chas Owens wrote: Why shift and unshift? Just use a for loop: I was trying to constrain any replacements to just the two text fields, and to actively ignore all others - I should have made that clearer in the original post. In other words, if the line of text was this: 0097138 | BOOK T

Re: template toolkit

2007-04-07 Thread Nuke
oryann9 wrote: oryann9> All, oryann9> Is the Perl template toolkit a popular tool to use for oryann9> mid tier to senior Perl developers? I'm about as senior as they get for Perl developers {grin}, and it's clearly my templating language of choice. OK great, Thx for responding! I read the CP

Re: Text munging problem

2007-04-07 Thread Glenn Booth
Hi, So it's true... there really is more than one way to do it. Thanks for all the answers - I'm learning something; mostly that I was making it way too complicated, and that my regular expressions suck. Thanks all. Regards, Glenn. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional