in reply to
Re^2: Executing a string as a Perl command
in thread Executing a string as a Perl command
...and your point (aside from the fact that your code prints "5") is...?
... and this is better than my $var1 = 5;
my $var1 = 5;
The question was simply how to get it to execute once it was set. The answer is eval.
If the user gives you some form of # rm -rf * ~ / , a lot of your files get deleted
If you want to run arbitrary code supplied by a 100% trusted source at runtime, what would you use other than eval?
shiny regexes and rules offered by Perl 6
other CPAN module
by looking at it on my monitor
I print it and I read it in spare time
first I convert it into $FORMAT, then I parse it
I hire someone to do it
using my custom module
I write a brand new language to do the task
on the server where I play as human, XML is forbidden
what is XML?
I speak XML natively
I write a new grammar for Perl 6
some other way
Results (223 votes),