On Mon, Aug 18, 2003 at 11:28:42PM +0200, Gerrit P. Haase wrote: > > Nope. Seems to be a bug in your perl version. Which version are you > using right now? I consider the 5.8.0 series will be removed from the > mirrors soon, I was not very happy with it. 5.6.1-2 will stay and > eventually be updated to use cygwin-1.5.2 and probably also some day > in future there will be a 5.6.2 release, I'll look into this issue if > it is a bug in 5.6.x, and my 5.8.1-tobe snapshot with cygwin 1.5.2 > does it the correct way: > > $ perl -e 'print -x "/usr/bin/bash" ? 0 : 1 , "\n"' > 0 > $ perl -e 'print -x "/usr/bin/bash.exe" ? 0 : 1 , "\n"' > 0 > $ perl -v > > This is perl, v5.8.1 built for cygwin-multi-64int > (with 1 registered patch, see perl -V for more detail) > ... Gerritt,
FWIW, your test above is not conclusive (which doesn't mean that your 5.8.1-tobe is incorrect). You need to setup a situation as described by Benoit where ls -l appears to show that the file isn't executable although it really is. Using the access function is the way to go. This is what I observe (with perl from setup) $ perl -v This is perl, v5.8.0 built for cygwin-multi-64int $ perl -e 'print -x "/usr/bin/bash" ? 0 : 1 , "\n"' 1 $ [ -x /usr/bin/bash ]; echo $? 0 Pierre -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/