File::SearchPath is a Perl module to search for a file in an environment variable path.
SYNOPSIS
use File::SearchPath qw/ searchpath /;
$file = searchpath( 'libperl.a', env => 'LD_LIBRARY_PATH' );
$file = searchpath( 'my.cfg', env => 'CFG_DIR', subdir => 'ME' );
$path = searchpath( $file, env => 'PATH', exe => 1 );
$path = searchpath( $file, env => 'PATH', dir => 1 );
$file = searchpath( 'ls', $ENV{PATH} );
$exe = searchpath( 'ls' );
This module provides the ability to search a path-like environment variable for a file (that does not necessarily have to be an executable).
Product's homepage
Requirements:
· Perl