in reply to greping in subdir
I also use perlfunc:system instead of backticks because you're not capturing the output of the make command. Also, this may be more secure because system with multiple arguments does not parse shell metacharacters such as * and ..use File::Find::Rule; my @file = find( file => name => '*.cc', in => '/clearb/pa/wBcn' ) or die "Find Failed: $!"; foreach (@file) { s/\.cc$/.cpp/; @args = system('/usr/bin/make', '-f', $_); $args == 0 or die "system @args failed: $?"; }
|
|---|