Greetings, Monks!
Long have I assimilated knowledge from you, unseen. I emerge from the shadows of Lurkwood to place this query before you:
How do I provide command-line arguments to a command-line Perl call (from a tcsh script, no less)?
The purpose of this operation is to replace this line in ConfigFile:
With this:
(Where $tcsh_input is actually a command-line argument to the tcsh script)
Here is what I am attempting now in my tcsh script:
perl -pi -e '$design = $ARGV[0] ; s/.*'def'.*''/\t"def" => "dumper\/$design.def",/g' ConfigFile $tcsh_input
Any arguments after the -e switch, however, seem to be treated as input files, so I see this:
>> perl -pi -e '$design = $ARGV[0] ; s/.*'def'.*''/\t"def" => "dumper +\/$design.def",/g' ConfigFile ADCIF Can't open ADCIF: No such file or directory, <> line 194.
Is there a separate switch I can use before -e to represent the arguments (accessible through @ARGV) to the program?
Kindly bless me with your wisdom, so that I may express my gratitude and scurry back into the shadows from whence I came; all this light is hurting my eyes.
~Recursion
In reply to Command-line arguments to command-line Perl by RecursionBane
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |