in reply to substituting with hash data

Something like this perhaps?
$string =~ s/$_/$hash{$_}/g for (keys %hash);