The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

File::SearchPath - Search a UNIX style path for a file.

SYNOPSIS

  use File::SearchPath;
  $fullpathtofile = searchpath($filename, $path);

DESCRIPTION

contains only one function, searchpath, which is exported by default.

searchpath

    accepts a file name and a UNIX style (colon delimited) path to search for that file.

    It will only return a successful path if the file exists, is a file, and is readable.

RETURN

returns undef if the search fails.

returns the full path to the file otherwise.

EXAMPLE

perl -MFile::SearchPath -wle'print searchpath(q{ls},$ENV{PATH})'

    use File::SearchPath;
    searchpath("cat",$ENV{PATH});

EXPORTS

searchpath()

AUTHOR

Robert Spier <RSPIER@cpan.org>

SEE ALSO

File::Find

3 POD Errors

The following errors were encountered while parsing the POD:

Around line 53:

'=item' outside of any '=over'

Around line 63:

You forgot a '=back' before '=head1'

You forgot a '=back' before '=head1'

Around line 69:

=back without =over