in reply to search-and-replace in files

aloha. bit late but i should not miss this opportunity to advertise ken williams' totally insane Tie::Text module;

here goes: following file = masssub.pl

use Tie::TextDir; ($old, $new, $dir) = @ARGV; tie %dirs, 'Tie::TextDir', ($dir || "."), 'rw'; map { $dirs{$_} =~ s/$old/$new/g } keys %dirs; untie %dirs;
invoke via massub.pl subthis forthis inthisdirectory

careful to specify the dir or it will sub in the working one.