From: Steve Harper <[EMAIL PROTECTED]> > Can someone please tell me why the following doesn't work? Observe: > D:\>perl -pi.bak -e 's/this/that/g' testtextfile.txt > > I'm fairly perplexed by this difference in behaviour, I've read a fair > amount in the documentation to try to figure this out, but nothing > I've seen has really answered my question.
Most probably you should have been reading different docs. > I'm sure its something > stupid, like shell differences, Yes exactly. Singlequotes are not special to cmd.exe, you have to use doublequotes. And of you may not assume that backslash sequences or anything like that will be understood. Basicaly .. if you are used to it you'd better install and use a Unixish shell. You should be able to find some that you may use without need for complete cygwin. > but it seems like the perl runtime is > getting everything it needs here and is still not making the changes > to the file. I think Perl doesn't execute s/this/that/g but 's/this/that/g' which is a little different thing, isn't it? Jenda =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ========== There is a reason for living. There must be. I've seen it somewhere. It's just that in the mess on my table ... and in my brain. I can't find it. --- me _______________________________________________ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs