in reply to Update hash value

What you're doing is called "clubbing somebody to death with a loaded Uzi": instead of if iterating over all hash keys and looking op if one is equal to another key, you can simply look up the second key:
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.

Replies are listed 'Best First'.
Re^2: Update hash value
by Sun751 (Beadle) on Jun 25, 2009 at 11:52 UTC
    Oh I didn;t know its get updated after substitution!!! thanks any way Cheers