protoplasm wrote:
I'm using Find::File in my program. Unfortunately I get the ugly
'Permission denied' output that I'd normally redirect to /dev/null if
I was using bash.

Here is the command I used to generate the Find::File code:
$ find2perl /usr -name libaest.dylib -print

I saved that to a new file and tested:

@naiad ~/development/perl] ./find_test.pl
/usr/local/lib/libaest.dylib
Can't cd to (/usr/share/wikid/help/de.lproj/) wiki: Permission denied
 at ./find_test.pl line 22
Can't cd to (/usr/share/wikid/help/en.lproj/) wiki: Permission denied
 at ./find_test.pl line 22
Can't cd to (/usr/share/wikid/help/fr.lproj/) wiki: Permission denied
 at ./find_test.pl line 22
Can't cd to (/usr/share/wikid/help/ja.lproj/) wiki: Permission denied
 at ./find_test.pl line 22

I'd like to have the equivalent of this where I only get the actual
result[s]:

@naiad ~/development/perl] find /usr -name libaest.dylib -print 2> /
dev/null
/usr/local/lib/libaest.dylib

Is that possible with Find::File. I'd really prefer the user not see
the 'Permission denied' output.

perldoc File::Find

[ SNIP ]

WARNINGS
       If you run your program with the "-w" switch, or if you use the
       "warnings" pragma, File::Find will report warnings for several
       weird situations. You can disable these warnings by putting the
       statement

           no warnings ’File::Find’;

       in the appropriate scope. See perllexwarn for more info about
       lexical warnings.



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to