|Welcome to the Monastery|
Re^2: Command-line arguments to command-line Perlby RecursionBane (Beadle)
|on Oct 03, 2010 at 20:51 UTC||Need Help??|
Thanks for the response, NetWallah!
This is, indeed, Linux. Rather than escape-character woes, I think the problem I'm facing is because everything after the -e <program code> switch is treated as an input file (and not an argument to the Perl program itself).
In my code example, I would like $ARGV to contain a certain value (ADCIF, in this case):
perl -pi -e '$design = $ARGV ; s/.*'def'.*''/\t"def" => "dumper\/$design.def",/g' ConfigFile $tcsh_input
This code should behave like so:
perl -pi -e '$design = "ADCIF" ; s/.*'def'.*''/\t"def" => "dumper\/$design.def",/g' ConfigFile
Here, I am trying to provide "ADCIF" to the perl script on-the-fly (which is why I need the argument to be contained in @ARGV).
I apologize if my initial question was unclear. Please let me know if you have any other suggestions.