#!/usr/bin/perl -w use strict; use warnings; my($cmd) = shift @ARGV || die <<__MORT__; Nothing to search for. Invoke this program with the command name or part of the command name for which you want to search in your \$PATH. usage: $0 [command to search for in \$PATH] __MORT__ foreach (split(/:/,$ENV{'PATH'})) { print qq[IN "$_"\n], (`ls ${\quotemeta $_}|grep $cmd`||"[none]\n"), "--\n\n" }