On 11/3/06, Peter Daum <[EMAIL PROTECTED]> wrote:
I am looking for an way to interpolate backslash-sequences within a string with the usual perl semantics
That's what eval does, although you have to build your string with care. Don't let the user put their own data into that string; they can (accidentally or intentionally) crash your program or worse, if you use eval. A better way would be to interpolate only the sequences that you need to support. I'd write a subroutine to do that, returning the converted string. It's simple to loop over the input string and build the new string as you go, and it completely avoids the riskiness of eval. Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>