in reply to Search and replace
Please answer this question: have you read and studied the examples in perlrequick? There is a section entitled exactly "Search and replace".