Through command line itself we can achieve your requirement.

Code:
 $perl -p -i.bak -e "s/RR_/TT_/g;"  test.txt
The -i option give the backup file.
After executing the command you will have the both files "test.txt" and "test.txt.bak" [ RR_WORLD and TT_WORLD ]