vc está usando windows?! no windows, por algum motivo, ele não consegue fazer isso sem backup... basta fazer o seguinte: substitua o -i por -i.bkp (ou qq outro final de arquivo...) antes de substituir ele vai fazer uma cópia de backup... se o nome do seu arquivo era
teste.txt, o backup vai ser teste.txt.bkp<br><br><div><span class="gmail_quote">Em 04/12/07, <b class="gmail_sendername"><a href="mailto:fernandolouis@terra.com.br">fernandolouis@terra.com.br</a></b> <<a href="mailto:fernandolouis@terra.com.br">
fernandolouis@terra.com.br</a>> escreveu:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff">
<div><font face="Trebuchet MS" size="2">Fernando não conhecia essa
solução.</font></div>
<div><font face="Trebuchet MS" size="2">Fiz o teste e me retornou o seguinte erro:
Can´t do inplace edit without backup. Porque?</font></div>
<div><font face="Trebuchet MS" size="2"></font> </div>
<div><font face="Trebuchet MS" size="2">[]s,</font></div>
<div><font face="Trebuchet MS" size="2">Fernando</font></div><span class="q">
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div>
<div style="background: rgb(228, 228, 228) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<b>From:</b>
<a title="fernandocorrea@gmail.com" href="mailto:fernandocorrea@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Fernando Oliveira</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a title="cascavel-pm@pm.org" href="mailto:cascavel-pm@pm.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Cascavel Perl Mongers</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Tuesday, December 04, 2007 3:42
PM</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> Re: [Cascavel-pm]otimização em
manipulação de texto</div>
<div><font face="Trebuchet MS" size="2"></font><br></div>perl -i -pe
's/$regex/$sejaLaOQueFor/g' arquivo<br><br></blockquote></span></div>
<br>_______________________________________________<br>Cascavel-pm mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Cascavel-pm@pm.org">Cascavel-pm@pm.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://mail.pm.org/mailman/listinfo/cascavel-pm" target="_blank">
http://mail.pm.org/mailman/listinfo/cascavel-pm</a><br></blockquote></div><br><br clear="all"><br>-- <br>[]'s Fernando