http://www.perlmonks.org?node_id=123259


in reply to regex substitution

closer to what you want..
$text =~ s/#([^#]+)#/$hash{$1}/g
Rich