Mar 23, 2012, 12:11 PM
Post #3 of 3
Your regular expression should consist only of a single character class containg only the two special characters. The rest of the substitution command is exactly as you codded it. However, each variable only needs to be processed once.
Re: [orange] multiple string replace
[In reply to]
If you need to process all the variables with a single line in a loop, you need a 'symbolic reference' (refer: perldoc perlref) . This only works on global (not my) variables and is not allowed under "use strict".
You can avoid this problem by using a hash or an array rather than a list of similiar variable names.