in reply to Re: substitution in a string
in thread substitution in a string
How about
/^(?i:ORACLE_SID|ORACLE_HST_SID|ORACLE_HOME|SDP_HOME)=/ && s/([^=]+)/(my $lhs=$1) =~ tr:_:.:; $lhs/e for @envArray;
Roger
update: better idea by Roy Johnson below. Doh!
However his code doesn't actually work because the brackets are the (?imsx-imsx:pattern) extension. Below is a possible fix:
s/^((?i)ORACLE_SID|ORACLE_HST_SID|ORACLE_HOME|SDP_HOME)(?==)/(my $lhs=$1) =~ tr:_:.:; $lhs/e for @envArray;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: substitution in a string
by Roy Johnson (Monsignor) on Sep 28, 2005 at 14:36 UTC |