use File::Find; find sub { push @ARGV, $File::Find::name if /\.INF$/; }, "."; $^I = ".BAK"; while (<>) { s/Name/Fullname/g; print; }