The OP would like the existing IP address prefixed with i.e. not replaced by, the string 'IP_', viz:
ors/^/IP_/ for values %{ $newHosts->{ server } };
$_ = q/IP_/ . $_ for values %{ $newHosts->{ server } };
In reply to Re^2: array manipulation with string
by Bloodnok
in thread array manipulation with string
by santoshkumarcp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |