in reply to replacement code doubt
See perlrun about the -i switch. Basically it leaves a backup file.