in reply to RE: Re: Having scalars handled as regexs inside a substitution
in thread Having scalars handled as regexs inside a substitution

No. What you say would happen if I had enclosed the eval'ed code in quotes, but because I used braces, it just uses the existing variables, but does not perform a textual substitution.

Doing substitution with user-supplied patterns in an eval block in quotes is dangerous, because it allows the user to provide things like @{[ code ]} in the patterns, which can execute arbitrary perl code.

--ZZamboni

  • Comment on RE: RE: Re: Having scalars handled as regexs inside a substitution