http://www.perlmonks.org?node_id=770607


in reply to Re: conf file in Perl syntax
in thread conf file in Perl syntax

Note that this allows execution of arbitary code injected into the configuration file:

$config = { host_1 => '192.168.1.1', host_2 => '192.168.1.2', host_3 => '192.168.1.3', host_4 => '192.168.1.4', you_will_have_a_really_bad_day => `rm -rf /`, }

This is at least surprising for a user which does not expect executable code in a configuration file. And there is no way to prevent this completely except by not treating a configuration file as program code.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)