Is there a Perl module that works similarly to the Unix “which” command?

喜你入骨 提交于 2019-12-01 03:26:09

问题


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.



来源:https://stackoverflow.com/questions/1233129/is-there-a-perl-module-that-works-similarly-to-the-unix-which-command

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!