use File::Spec::Functions qw( catfile path ); my $foo_available = grep -x catfile( $_, 'foo' ), path;