{ my @starters = @ARGV ? @ARGV : 'F:/test'; @ARGV = (); find sub { if (($_ =~ ".c") or ($_ =~ ".h")) { push @ARGV, "$File::Find::dir/$_"; } }, @starters; } while (<>) { ... } #### Can't do inplace edit: F:/test/subdir is not a regular file at script.pl line 28