The other more brute force less pretty way to solve the problem is:
foreach $key (keys %hash) { $text =~ s/$key/$hash{$key}/eg; }
-I went outside... and then I came back in!!!!
In reply to Re: Re: using a hash to do substitution?
by Henri Icarus
in thread using a hash to do substitution?
by mr.dunstan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |