multiwhich
is a small utility which looks for an executable in all directories in your $PATH
. For example, on my MacBook Pro, it gives me:
$ multiwhich perl vim doesnotexist
---
- perl:
- /Users/auser/perl/5.20.0/bin/perl
- /opt/local/bin/perl
- /usr/bin/perl
- vim:
- /opt/local/bin/vim
- /usr/bin/vim
- doesnotexist: []
It should soon be available on CPAN. The repo is on GitHub.
For more, see CPAN day, or follow @cpan_new, or search #cpanday.