
BillKSmith
Veteran
Mar 23, 2012, 12:11 PM
Post #3 of 3
(1245 views)
|
|
Re: [orange] multiple string replace
[In reply to]
|
Can't Post
|
|
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. 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. Good Luck, Bill
|