KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
From the Windows command prompt I generate a text file of all the files in a directory: dir c:\logfiles /B > config.txt Output: 0001_832ec657.log 0002_a7c8eafc.log I need to feed the "config.txt" file to another executable, but before I do so, I need to modify the file to add some additional information that the executable needs. So I use the following command: perl -p -i.bak -e 's/log/log,XYZ/g' config.txt I'm expecting the result to be: 0001_832ec657.log,XYZ 0002_a7c8eafc.log,XYZ However, the "config.txt" file is not modified. Using the "-w" option, I get the warning message: Useless use of a constant in void context at -e line 1. What am I doing wrong?
Tags (comma-separated)
Save Edits
Cancel