When you define $cmd as a string literal, you need to escape the backslashes, so you need to write:
my $cmd = "find $dir1 \\(! -name /proj/dev_dbdump/files_36 -prune\\) +-name $patt -print";
You many also need to escape the search pattern, depending on what it is
Having said that, I think you would be better off investigating File::Find
In reply to Re: Backtick Query
by chrestomanci
in thread Backtick Query
by kevictor83
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |