Command line replacements
Say you have a file 'file.txt' and you want to replace all instances of 'dog' with 'cat' - do this,
perl -p -i.BACKUP -e "s?dog?cat?g" file.txt
The -i specifies a backup file. It can be any extension. In this case, file.txt will be changed, and the original will be saved to file.txt.BACKUP. The ? can be replaced by / if need be. Also the " can be '. The g specifies all instances of 'dog'. If g is not there, it will only replace the first instance of 'dog'.