http://qs1969.pair.com?node_id=19245


in reply to Which

I don't know of a faster way, however, there are more complete ways that take into account different platforms. Check the Perl Power Tools implementations of which

Also, if you are using a Unix platform, you'd probably be better off using the -x (can be executed) file test rather than -e (exists).