Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^2: Re-Interpolating a Scalar (a string)by friedo (Prior) |
on Jul 29, 2005 at 18:34 UTC ( [id://479506]=note: print w/replies, xml ) | Need Help?? |
While this will work fine, it's probably not a good idea. Especially if you don't know ahead of time what's going to be in $raw, any malicious code that gets put there will be evaled by your program. Further, string eval is quite slow from what I hear. Instead, I would highly reccomend using the hash lookup method provided by cmeyer above.
In Section
Seekers of Perl Wisdom
|
|