Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
How would I write this multiple substitution script?by Carnival (Novice) |
on Oct 13, 2011 at 09:14 UTC ( [id://931176]=perlquestion: print w/replies, xml ) | Need Help?? |
Carnival has asked for the wisdom of the Perl Monks concerning the following question: Hello Monks, I'm a novice Perl writer in need of a bit of help. I need to carry out several substitutions, on the contents of several files, in several directories.. if that makes sense! Currently I have all my substitutions as one-liners which execute on the current working directory, but I would like to combine them all into a single clean script. Simple explanation for what I would like to do:
How would I do this? I have a test script below, the first part of which successfully chdirs to /attach and changes the filenames to lowercase. The second part is one of the scripts to change the contents of each file in a dir. I'm not sure if I'm headed in the right direction or not (or if any of this is salvageable?).
Back to
Seekers of Perl Wisdom
|
|