But from what I understand, both are capable of executing code that results from potentially dangerous user input
Try it
$ perl -le " eval { @ARGV } " print 123 $ perl -le " eval qq{ @ARGV } " print 123 123
block eval prints nothing, it doesn't turn user input into code
String eval does
In reply to Re: The safety of string eval and block eval.
by beech
in thread The safety of string eval and block eval.
by TrixieTang
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |