Now my array contains data in the form oracle_hst_sid=hsta oracle_sid=sdpa oracle_home=/oracle/product/10.2.0 sdp_home=/oracle/oracle8 I want it to contain data in the form oracle.hst.sid=hsta oracle.sid=sdpa and so on .I am tryng to reduce my steps..please helpmy @envArray = `rsh sdp1 su - oracle8 -c env `; my $i = 0; my @array; foreach(@envArray) { if($_ =~ (/^(ORACLE_SID)\=(.*)/i)|(/(ORACLE_HST_SID)\=(.*)/i)| +(/(ORACLE_HOME)\=(.*)/i)|(/(SDP_HOME)\=(.*)/i)) { my $temp = lc($1); #$temp = s|_|.|; $array[$i] = "$temp=$2\n"; $i++; }
In reply to substitution in a string by s_gaurav1091
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |