tags:

views:

137

answers:

2

I was on Perlmonks and found this great listing:

http://www.perlmonks.org/?node_id=627015

But it was missing "which", the function that searches for an executable in all the directories in your PATH. (I am porting a Perl script to Windows.)

Is there a Perl module that simulates this?

+15  A: 

File::Which. Always check CPAN! :)

pilcrow
Thanks. Google failed me because "which" is a common word and all I got was garbage from my searches.
Paul Chernoch
Why use Google when you can use CPAN?
innaM
Well, why use Google when you can use CPAN Search (http://search.cpan.org). It's very hard to easily find things at www.cpan.org.
brian d foy
+1  A: 

Have you seen this Snippet?

which (for Windows) in pure perl

The follow-up points to the module File::Which on CPAN.

bart