Re-Interpolating a Scalar (a string)by Nichodemus (Initiate)
|on Jul 29, 2005 at 18:22 UTC||Need Help??|
Nichodemus has asked for the
wisdom of the Perl Monks concerning the following question:
I am relatively new to Perl -- I figure there must already be a way to do this without writing my own custom subroutine. Here's my question:
How can I force a scalar variable to be re-interpolated?
For example, lets say that this line of code:
fred has $color eyes
What I want to be able to do is later set $color to equal "blue." And then have:
$parsed = # ??? something to re-interpolate $raw
print $parsed; # I get the text "fred has blue eyes"
Anyone have any ideas?