Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners > redirect Find::...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 10872 of 12002
Post > Topic >>

redirect Find::File to /dev/null

by sprotsman@[EMAIL PROTECTED] (Protoplasm) Apr 4, 2008 at 10:41 AM

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:

@[EMAIL PROTECTED]
 ~/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]:

@[EMAIL PROTECTED]
 ~/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.

--Shawn
 




 6 Posts in Topic:
redirect Find::File to /dev/null
sprotsman@[EMAIL PROTECTE  2008-04-04 10:41:04 
Re: redirect Find::File to /dev/null
krahnj@[EMAIL PROTECTED]   2008-04-05 07:20:31 
Re: redirect Find::File to /dev/null
sprotsman@[EMAIL PROTECTE  2008-04-05 22:11:07 
Re: redirect Find::File to /dev/null
krahnj@[EMAIL PROTECTED]   2008-04-06 12:07:43 
Re: redirect Find::File to /dev/null
sprotsman@[EMAIL PROTECTE  2008-04-07 13:16:55 
Re: redirect Find::File to /dev/null
krahnj@[EMAIL PROTECTED]   2008-04-07 16:57:31 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 14 9:47:37 CDT 2008.