in reply to Command-line arguments to command-line Perl
Take a look at Perl's -s option.
Ignoring any quoting issues, something like this should work:
perl -pi -se 's/.*'def'.*''/\t"def" => "dumper\/$D.def",/g' -D=ADCIF C +onfigFile
Note: That -D=... becomes $D inside the script.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Command-line arguments to command-line Perl
by RecursionBane (Beadle) on Oct 04, 2010 at 05:01 UTC | |
by BrowserUk (Patriarch) on Oct 04, 2010 at 09:52 UTC |