http://www.perlmonks.org?node_id=45944


in reply to ActivePerl

It's probably just the case that you did not reboot. ActivePerl may have added the proper line to your AUTOEXEC.BAT file, but DOS windows will not get any of it's benefits until you reboot. You can also see if it is there by looking at the fie yourself. Go to Start->Run and enter WORDPAD C:\AUTOEXEC.BAT. Look for a line that starts with PATH and see if the word PERL is in there. It should be something like C:\PERL\BIN. If it *is* in there, you are all set, just reboot. If not, you will have to add it yourself. Find the directory that ActivePerl was installed into, and then make sure that it has a "BIN" directory under that. This is the directory that actually stores the PERL.EXE file, which is what your DOS windows could not find. (You can also do a "Find" for PERL.EXE to determine the correct directory)

(Side note: you can type the full path to PERL.EXE or set a temporary path at the command line with PATH=%PATH%;C:\PERL\BIN if you do not wish to reboot yet.) At any rate, the paths (places to look for executable files) are separated by semicolons, so just add the path to perl at the end of the final PATH statement in your AUTOEXEC.BAT. In other words, if your AUTOEXEC.BAT looks ike this:

@ECHO OFF DOSKEY /INSERT SET TZ=EST5EDT cls Echo Depressing kernel... PATH=C:\WINDOWS;C:\WINDOWS\COMMAND
just change the last line to read:
PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\PERL\BIN
(or wherever ActivePerl has installed Perl. If you still can't find it, just do a Find on "PERL.EXE")

Replies are listed 'Best First'.
Re: Re: ActivePerl
by TStanley (Canon) on Dec 10, 2000 at 17:58 UTC
    Unfortunately, ActivePerl does not add the path to the autoexec.bat file.
    I had to add it manually, and reboot my system, when I installed it on my
    home PC.

    TStanley
    There can be only one!
      On NT, it automatically modifies the system environment (I guess this is stored in the registry or something). You can see this by right-clicking on My Computer, selecting Properties, and selecting the Environment tab. I don't know if Win9x has something similar or not, but it seems strange that the installation would skip something like this. Indeed, the release notes indicate that somehow, it should be adding this information to the PATH. Under Win9x, I wonder if this cannot be done via the registry as well...

        The good news is, the ActivePerl installer does modify your AUTOEXEC.BAT. At least, it tries to - I don't know why it would have failed to do so for indapa. It should also ask you to reboot, as that is the only way that the environment can be set for all subsequent DOS windows. The bad new is, cannot be done through the registry, but requires a reboot, and DOS (and AUTOEXEC.BAT) load first, before the Windows 9x GUI, and are thereafter in memory. The only thing the registry gets is file association information (so Win9x knows what to do with a *.pl file, etc.) and some registration/uninstall information. All of this applies to Win9x of course, and not to Win[NT|2000|ME|WhateverTheyAreCallingItThisMonth].