So, instead of the "s" commands being in a separate file, you could just have a bunch of one-liners in the file, each one specific to the substitution you need. Cleaner, and more maintainable. Let perl do the work for you.perl -i.bak -pe "s/OrigTxt/SubsText/g" FileName1.txt FileName2.txt
"For every complex problem, there is a simple answer ... and it is wrong." --H.L. Mencken
In reply to Re: Run a variable as a line of code?
by NetWallah
in thread Run a variable as a line of code?
by lev36
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |