Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: Is this code secure, can I test it on my machine?

by ikegami (Pope)
on May 23, 2010 at 19:25 UTC ( #841276=note: print w/replies, xml ) Need Help??


in reply to Re^2: Is this code secure, can I test it on my machine?
in thread Is this code secure, can I test it on my machine?

string eval is already flagged as dangerous spot and "use" too

I missed the mention of string eval. As for the use re 'eval';, it's not prevented by preventing the use of use as I suspect you can achieve the same effect without actually using use.

The new thing here is substitution with two "e"-s:

It's really just another way of writing a string eval.

s/.../.../ee
is the same as
s/.../eval "..."/e

(without making '"' special).

Do I understand correctly that a single e after the substitution would only be dangerous if the code inside is dangerous

If you consider $1 safe in code, then s/.../$1/e is safe too.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://841276]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2019-02-23 18:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I use postfix dereferencing ...









    Results (120 votes). Check out past polls.

    Notices?