use strict; use warnings; my @array = qw( oracle_hst_sid=hsta oracle_sid=sdpa oracle_home=/oracle/product_1/10.2.0 sdp_home=/oracle/oracle8 ); my @newArray = ( map {my ($lhs, $rhs) = /(.*?)=(.*)/; $lhs =~ tr/_/./; "$lhs=$rhs"} @array ); print join "\n", @newArray;