Scripting >> Perl >> How to replace multiple matches of same pattern in a string

 

eg. to replace all occurrences of q= with Q=

string =~ s/q=/Q=/g

use the modifier 'g' after s/ / /