## can't run perl commands from command line

### can't run perl commands from command line

Greetings, I just installed perl v5.8.7 onto a 2003 server box. I can
only seem to get perl -v to run on the command line only when I cd into
the c:\perl\bin directory.

recognised as an internal or external command, operable program or
batch file error'.

I am plannign on running MRTG on this box and I am sort of new to perl.
I got mrtg to run on one of my workstations with win2k but I am
stumbling with this 2003 server.

Is it an IIS issue? Is it a permissions issue?

Thanks all!

### can't run perl commands from command line

i'm not familiar with running Perl on a Windows box, but it sounds like
you need to set your PATH Environment variable to include the absolute
path to the location of your Perl.

### can't run perl commands from command line

On 28 Jul 2005 06:12:59 -0700

I've only used Win98, I think you can set your path in a file called 'AUTOEXEC.BAT' which should reside in whatever's Windows' equivalent to the root dir, i.e. something like 'C:\'.

### can't run perl commands from command line

It appears c:\perl\bin is not in your path

Has nothing to do with Perl, would be the same for any other program, too.

What does IIS have to do with Perl?

Unlikely because you said you can run perl.exe if you cd to c:\perl\bin

jue

### can't run perl commands from command line

Which happens to be quite different from Win2k3. I'm not even quoting your
suggestion, it's so way off. To set the path just see the manual/help files

The OP didn't tell us which distribution he installed. Had he used
ActiveState then he would have had the option to have the installer do it
automatically.

jue

### can't run perl commands from command line

It's a testament to the MS Windows software architecture.
Users just can't tell anymore.

Tim Hammerquist
--
\$ echo pizza > /dev/oven

### can't run perl commands from command line

I created a system variable named 'perl' and gave it the value of
c:\perl\bin

'that is where my perl.exe file is located'

Still no joy.

I created a test .pl file as described by activestate to see if my web
server config is ok, adn that did work. I am perplex'd as to why I
cannot get anythign to run from teh command line though. I am dead in
the water regarding mrtg until I can get this working.
Thanks

### can't run perl commands from command line

you need to find your PATH environment variable and append
"c:\perl\bin" to the end (with a separator). I don't think you need a
PERL system variable.

Tuan

### can't run perl commands from command line

I have a 'user variable for administrator' variable named 'PATH' and
this is the value

€w?

That's right, gibberish

Then below that under system variables, I have a variable named 'Path'
that has

C:\Perl\bin\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\PROGRA~1\CA\SHARED~1\SCANEN~1

for the value.

I'm still lost. Thanks

### can't run perl commands from command line

> €w? >

And running "perl" from the command line still doesn't work? Hmm...
try changing your 'PATH' environment variable under user variables to
"C:\Perl\bin'. I don't think the gibberish is essential to your system
so you can get rid of it.

### can't run perl commands from command line

> €w? >

I assume that, even with the system-wide Path variable above, it
still doesn't work. It's possible the user PATH variable
supercedes the system one. Remove the *user* PATH variable (the
gibberish) and leave the system-wide variable.

For good measure, you might try logging out, then back in, after
making the environment modifications. Then open up a command
prompt and try typing just "perl -v" to test.

HTH,
Tim Hammerquist

### can't run perl commands from command line

> €w? >

All that springs to mind is that you have not started a new command
window since amending your path environment variable. Unlikely though
it is, it's all I can think of.

--
p

### can't run perl commands from command line

Type "set" from your command line. Your path environment will be there.

</bf>

--
p

### can't run perl commands from command line

Tim, your suggestion work'd. Do I have anything to worry about by
removing that PATH variable?

Here are the results from 'set' from prawns guidence below

OS=Windows_NT
Path=C:\Perl\bin\;
GRA~1\CA\SHARED~1\
PATHEXT=.COM;.EXE;
perl=C:\Perl\bin

### can't run perl commands from command line

Neither. IIS does not run programs from the command line.

What Perl distribution did you install? If it was ActivePerl or IndigoPerl,
then they work straight out of the box without having to do any fiddling.