in reply to Re^2: substitution in a string
in thread substitution in a string

There's really no need to do a separate match and substitution, just change the pattern that the substitution matches:
s/^((?i:ORACLE_SID|ORACLE_HST_SID|ORACLE_HOME|SDP_HOME))(?==)/(my $lhs +=$1) =~ tr:_:.:; $lhs/e for @envArray;
(update: corrected the missing parens, as per Roger_B's update)

Caution: Contents may have been coded under pressure.