in reply to file cleaning up
use File::Find; find(\&process, qw(C:/foo C:/bar)); sub process { return unless /\.(?:h|c|cpp)\z/ and -f $File::Find::name; open FH, "+<", $File::Find::name; s/$some_character// while <FH>; close FH; } [download]