Is there a Perl module that works similarly to the

2019-02-17 16:30发布

问题:

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?

回答1:

File::Which. Always check CPAN! :)



回答2:

Have you seen this Snippet?

which (for Windows) in pure perl

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



标签: perl unix which