Your skill will accomplish
what the force of many cannot
Perl as a command executor (with hash variable substitution)by RecursionBane (Beadle)
|on Mar 21, 2013 at 18:46 UTC||Need Help??|
RecursionBane has asked for the
wisdom of the Perl Monks concerning the following question:
Greetings, Monks! I am trying to solve a problem with a rather stringent set of limitations. Having tried fruitlessly for several days, I turn to your wisdom to accomplish this.
Please keep in mind that I have greatly simplified the inputs and outputs in order to make it easy for you to read.
This package contains many hashes (simplified below to only contain one hash with one key):
I wish to allow the user to craft any shell command that uses this variable, like so (again, simplified):
I've created multiple versions of this program to no avail:
I think the problem might be because Perl does not interpolate hash values inside quotes.
Am I going about this the right way? Any suggestions from your collective wisdom would be much appreciated.