L
laredotornado
Hi, I'm using Perl 5.8.9 on Mac 10.6.3. I regularly run a search and
replace expression from the terminal, but when the replacing
expression contains an apostraphe, the replace doesn't work.
Specifically, I have
perl -pi -e 's/(\d\d\d)/\'$1\'/g' /tmp/output
but this is apparently not the right way to add apostraphes. What
would be the right way? Thanks, - Dave
replace expression from the terminal, but when the replacing
expression contains an apostraphe, the replace doesn't work.
Specifically, I have
perl -pi -e 's/(\d\d\d)/\'$1\'/g' /tmp/output
but this is apparently not the right way to add apostraphes. What
would be the right way? Thanks, - Dave