sub isExe { my $exe = shift; my @paths = split /;/, $ENV{PATH}; foreach my $path (@paths) { return 1 if -x $path/$exe; } return 0; }