Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Perl module that works similarly to the Unix "which" command? [closed]

Tags:

unix

perl

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?

like image 249
Paul Chernoch Avatar asked Aug 05 '09 13:08

Paul Chernoch


2 Answers

File::Which. Always check CPAN! :)

like image 137
pilcrow Avatar answered Oct 03 '22 18:10

pilcrow


Have you seen this Snippet?

which (for Windows) in pure perl

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

like image 42
bart Avatar answered Oct 03 '22 18:10

bart