in reply to Regular Expression Question
perlre explains why this is not permitted, and how to make it permitted if you really want to do it...
$string =~ /$re/; Before Perl knew how to execute interpolated code within a pattern, this operation was com pletely safe from a security point of view, although it could raise an exception from an illegal pattern. If you turn on the "use re 'eval'", though, it is no longer secure, so you should only do so if you are also using taint checking. Better yet, use the carefully con strained evaluation within a Safe module. See perlsec for details about both these mechanisms.
| We're not surrounded, we're in a target-rich environment! |
|---|
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Regular Expression Question
by grantm (Parson) on Apr 03, 2003 at 18:39 UTC | |
|
Re: Regular Expression Question
by Abigail-II (Bishop) on Apr 03, 2003 at 18:35 UTC |