sub available { my $program = shift; for my $pathdir (split /:/, $ENV{PATH}) { return 1 if -x "$pathdir/$program"; } return 0; }