my $key = 'res.ldlibrarypath'; for my $hashref($HR_wnt,$HR_unx,$HR_component) { if (exists $hashref->{$key} && $hashref->{$key} =~ m{/}) { $hashref->{$key} =~ s{/opt/app/$target.*?:}{} } }
Your hash is updated after that substitution if the regex matched, so I don't quite understand what your question is about.
In reply to Re: Update hash value
by moritz
in thread Update hash value
by Sun751
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |