# create a regex that matches any one of the hash keys $regex = join("|", map(quotemeta, keys %hash)); # substitute them s/($regex)/$hash{$1}/eg;
In reply to Re: using a hash to do substitution?
by no_slogan
in thread using a hash to do substitution?
by mr.dunstan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |