in reply to How would I write this multiple substitution script?
Why don't you test it on a test directories with test files?
Yes, you headed in a right direction. In the first directory you rename files and in the second you substitute contents of a files.
well, hint.
...and then rename.foreach $filename (@files) { open FILEIN, "<", $filename; open FILEOUT, ">", $filename."new"; while (my $data = <FILEIN>) { $data =~ s/red/blue/g; print FILEOUT $data; } close FILEIN; close FILEOUT; }
In Section
Seekers of Perl Wisdom