Jeffro Tull has asked for the wisdom of the Perl Monks concerning the following question:

I have installed Perl onto my Windows machine. Problem is, it will only run perl code if I am in the usr\bin directory. How do I direct it to run perl code from other directories?

Replies are listed 'Best First'.
Re: Installing Perl on Windows
by Masem (Monsignor) on Jan 08, 2002 at 19:15 UTC
    You need to add the path to the perl executable to your DOS path; if you are in Win95, 98, or ME, you have to modify your autoexec.bat for this. If you are in NT, 2K, or XP, you can set this under the System control panel (under an Environment variables). Here, you want to add the full directory name of where usr\bin sits, as shown below.

    For 95,98,ME, add the following line to the end of your autoexec.bat:

    PATH=C:\PATH\TO\PERL\USR\BIN;%PATH%

    -----------------------------------------------------
    Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
    "I can see my house from here!"
    It's not what you know, but knowing how to find it if you don't know that's important

Re: Installing Perl on Windows
by Rex(Wrecks) (Curate) on Jan 09, 2002 at 01:46 UTC
    "I have installed Perl onto my Windows machine." How did you do this?

    The earlier solution will work, however installing ActiveState is much easier and involves much less pain. It also gives you PPM, which, IMHO is a very good thing.

    "Nothing is sure but death and taxes" I say combine the two and its death to all taxes!