Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 examining the Monastery: (5)
As of 2018-11-18 09:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (205 votes). Check out past polls.

    Notices?