in reply to backreferencing fails in a search and replace with a hash
Interpolation is only happens once. $fsr_hash{$key} get interpolated, but not the $1 in $fsr_hash{$key}'s value. Imagine the following if things worked as you expected:
$a = '$a'; print "$a";
You're asking us to help you get Perl to execute arbitrary data, which is never a wise move. A better alternative is to use a template. String::Interpolate would require the least amount of changes.
See reinterpolation of regexp (and strings?) for an essentially identical question.
|
|---|