jjoyce has asked for the wisdom of the Perl Monks concerning the following question:
This script executes in my Linux without problem:
find . -type f \( -perm -0020 -o -perm -0004 -o -perm -0002 -o -perm -0001 -o -perm -1000 \) -lsHowever, when I try to embedded it on a Perl code:
#!/usr/bin/perl my $out = "output.txt"; open (MYFILE,"> $out"); print MYFILE `find . -type f \( -perm -0020 -o -perm -0004 -o -perm -0 +002 -o -perm -0001 -o -perm -1000 \) -ls`;
I receive the following error message:
sh: -c: line 0: syntax error near unexpected token `(' sh: -c: line 0: `find . -type f /( -perm -0020 -o -perm -0004 -o -perm -0002 -o -perm -0001 -o -perm -1000 /) -ls'
How can I fix the above code?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with Parentheses
by choroba (Cardinal) on Aug 21, 2012 at 21:12 UTC | |
by jjoyce (Initiate) on Aug 21, 2012 at 21:30 UTC | |
|
Re: Problem with Parentheses
by toolic (Bishop) on Aug 21, 2012 at 21:11 UTC | |
|
Re: Problem with Parentheses
by kcott (Archbishop) on Aug 21, 2012 at 21:21 UTC | |
|
Re: Problem with Parentheses
by james2vegas (Chaplain) on Aug 22, 2012 at 00:44 UTC |