Help for this page
use List::Util qw( first ); ... my $prog = shift; first { -x "$_/$prog } grep { m/\S/ && -d } split m/:+/ => $ENV{PA +TH}; }