I have a system that is composed of both bash scripts and Perl scripts.
Is there a safe way to specify config values that are used by both Perl scripts and shell scripts?
We need both as there are common elements which are simple MY_VAR=toto declarations along with Perl specific config values, e.g. hashes.
BTW We don’t have the Env module available in our hardened Perl build.
You don’t have to have
Envto be able to access environment variables. The following excerpt from theEnvdocumentation makes this plain:%ENVmakes constructing “config” hashes in Perl quite simple. In the following example, it’d probably be clearer to stick with%ENVitself: