First option should be better, because it is faster to implement, and run 
faster.
But open file using perl language and make changes using s operator, should be 
faster too.

The best way to choose should be make a test using two methods (using time unix 
command before ask perl script to verify time consuming)

José Pedro Silva Pinto




-----Original Message-----
From: Rodrigo Tavares [mailto:[EMAIL PROTECTED] 
Sent: terça-feira, 27 de Março de 2007 15:57
To: beginners@perl.org
Subject: Files manipulation 

Hello,

What's the more fast ?

1) perl -pi -e 's/foo/bar/g' file.txt

2) open the file and make modifications

In C/C++ manipulation of files are operations very
weighed. Slow perfomace.  


Best regards,

Rodrigo Faria Tavares


__________________________________________________
Fale com seus amigos  de graça com o novo Yahoo! Messenger 
http://br.messenger.yahoo.com/ 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to