sub isExe { my $exe = shift; my @paths = split /;/, $ENV{PATH}; foreach my $path (@paths) { return 1 if -x $path/$exe; } return 0; } #### if (isExe("tail.exe")) { print "tail.exe is in my PATH.\n" }