halfcountplus has asked for the wisdom of the Perl Monks concerning the following question:
However, it seems to me that this is okay:my $x = <STDIN>; eval($x);
For the purpose of testing a regexp (otherwise, "hey[" will crash the process), since even if you try inputingmy $x = <STDIN>; eval{ (my $s = "blah blah") =~ /$x/ }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: eval() and security
by ikegami (Patriarch) on Nov 24, 2009 at 18:20 UTC | |
by halfcountplus (Hermit) on Nov 24, 2009 at 19:21 UTC | |
|
Re: eval() and security
by almut (Canon) on Nov 24, 2009 at 19:25 UTC | |
|
Re: eval() and security
by SuicideJunkie (Vicar) on Nov 24, 2009 at 17:25 UTC | |
by halfcountplus (Hermit) on Nov 24, 2009 at 17:44 UTC | |
by Anonymous Monk on Nov 24, 2009 at 17:53 UTC | |
by halfcountplus (Hermit) on Nov 24, 2009 at 18:00 UTC | |
by almut (Canon) on Nov 24, 2009 at 18:08 UTC | |
by SuicideJunkie (Vicar) on Nov 24, 2009 at 17:54 UTC | |
by Anonymous Monk on Nov 24, 2009 at 17:59 UTC | |
by ikegami (Patriarch) on Nov 24, 2009 at 18:23 UTC | |
| |
by halfcountplus (Hermit) on Nov 24, 2009 at 18:07 UTC | |
by Anonymous Monk on Nov 24, 2009 at 17:30 UTC |