in reply to Re: PERL5LIB in Win XP
in thread PERL5LIB in Win XP

Here is my Perl -V (End) Built under MSWin32 Compiled at Dec 9 2010 04:03:28 %ENV: PERL5LIB="C:\Tools\Perfstat\Viewer\na_psf\perfstat_filters" @INC: C:\Tools\Perfstat\Viewer\na_psf\perfstat_filters C:/Perl/site/lib C:/Perl/lib . C:\Tools\Perfstat\Viewer\na_psf\perfstat_filters> I have tried the slashed with both backslash and forward slash. C:\Tools\Perfstat\Viewer>perl psf_get_all_data.pl Can't open perl script "psf_get_all_data.pl": No such file or directory C:\Tools\Perfstat\Viewer>perl C:\Tools\Perfstat\Viewer\na_psf\perfstat_filters\ sf_get_all_data.pl 'psf_filers.pl' is not recognized as an internal or external command, operable program or batch file. 'psf_versions.pl' is not recognized as an internal or external command, operable program or batch file. C:\Tools\Perfstat\Viewer\na_psf\perfstat_filters>dir psf_get_all_data.pl Volume in drive C has no label. Volume Serial Number is 940B-DAAD Directory of C:\Tools\Perfstat\Viewer\na_psf\perfstat_filters 08/30/2007 05:54 PM 30,459 psf_get_all_data.pl 1 File(s) 30,459 bytes 0 Dir(s) 47,293,513,728 bytes free C:\Tools\Perfstat\Viewer\na_psf\perfstat_filters>

Replies are listed 'Best First'.
Re^3: PERL5LIB in Win XP
by ikegami (Patriarch) on Feb 11, 2011 at 23:18 UTC

    C:\Tools\Perfstat\Viewer>perl psf_get_all_data.pl
    Can't open perl script "psf_get_all_data.pl": No such file or directory

    @INC is used by require, use and maybe do. It's not used to locate the script passed to perl.

    Perl relies on the OS to provide searching facilities for the script itself. Specifically, to get that behaviour in Windows, you are expected to associate .pl files with Perl (done for you by ActivePerl's installer), and add the directory in which the script resides to your PATH. Under those conditions, you can execute your script by simply typing psf_get_all_data.pl.

Re^3: PERL5LIB in Win XP
by syphilis (Archbishop) on Feb 12, 2011 at 00:07 UTC
    C:\Tools\Perfstat\Viewer>perl psf_get_all_data.pl Can't open perl script "psf_get_all_data.pl": No such file or directory

    To elaborate a little on what ikegami provided, that command will work only if psf_get_all_data.pl is in the C:\Tools\Perfstat\Viewer directory.

    Cheers,
    Rob