can't run perl commands from command line

J

josephweiss

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.
From the commad line at any other location I am getting the ... 'is not
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!
 
I

it_says_BALLS_on_your forehead

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.
 
S

Sven-Thorsten Fahrbach

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.

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:\'.
 
J

Jürgen Exner

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'.

It appears c:\perl\bin is not in your path
I am plannign on running MRTG on this box and I am sort of new to
perl.

Has nothing to do with Perl, would be the same for any other program, too.
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?

What does IIS have to do with Perl?
Is it a permissions issue?

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

jue
 
J

Jürgen Exner

Sven-Thorsten Fahrbach said:
I've only used Win98,

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
for your OS.

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
 
J

josephweiss

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
 
T

Tuan Bui

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
 
J

josephweiss

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

€·øwÿÿÿÿò|ôw³sôwósô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
 
T

Tuan Bui

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

€·øwÿÿÿÿò|ôw³sôwósô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

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.
 
P

prawn

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

€·øwÿÿÿÿò|ôw³sôwósô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

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

prawn

prawn said:
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.

<Bad form>

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

</bf>
 
J

josephweiss

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
 
T

Tintin

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?

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top