Try something like
#Replace greetings value my $hash = sub { exists($hash{$2}) ? $hash{$2} : $1 }; $value =~s/(-(\S+?)-)/&$hash()/ge;
In reply to Re: Substitution problem
by ambrus
in thread Substitution problem
by selva
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |