Change the a string in the file

Hi experts,

If i have a directory and 10 files in it, which has string "Myapp" and i wish to change it to "Mydb" in all of the 10 files, how do i do that ?

Thanks very much

Regards
G

perl -pi -e "s/Myapp/Mydb/g" *

for file in `ls -l|awk '{print $9}'`
do
sed 's/Myapp/Mydb/' < $file > $file.new
mv $file.new $file
done

WOW ! Amazing what a one liner in perl can do.

Thanks guys