For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > July 2005 > can't run perl commands from command line









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author can't run perl commands from command line
josephweiss@SPAMMOgmail.com

2005-07-28, 9:09 am

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!

it_says_BALLS_on_your forehead

2005-07-28, 9:09 am

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.

Sven-Thorsten Fahrbach

2005-07-28, 9:09 am

On 28 Jul 2005 06:12:59 -0700
"it_says_BALLS_on_your forehead" <simon.chao@fmr.com> wrote:

> 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ürgen Exner

2005-07-28, 9:09 am

josephweiss@SPAMMOgmail.com wrote:
> 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ürgen Exner

2005-07-28, 9:09 am

Sven-Thorsten Fahrbach wrote:
> On 28 Jul 2005 06:12:59 -0700
> "it_says_BALLS_on_your forehead" <simon.chao@fmr.com> wrote:
>
>
> 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


Tim Hammerquist

2005-07-28, 5:01 pm

Jürgen Exner <jurgenex@hotmail.com> wrote:
> josephweiss@SPAMMOgmail.com wrote:
>
> What does IIS have to do with Perl?


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

Tim Hammerquist
--
$ echo pizza > /dev/oven
josephweiss@SPAMMOgmail.com

2005-07-28, 5:01 pm

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

Tuan Bui

2005-07-28, 5:01 pm

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

josephweiss@SPAMMOgmail.com

2005-07-28, 5:01 pm

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

=80=B7=F8w=FF=FF=FF=FF=F2|=F4w=B3s=F4w=F
3s=F4w=90


That's right, gibberish

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

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

for the value.

I'm still lost. Thanks

Tuan Bui

2005-07-28, 5:01 pm



josephweiss@SPAMMOgmail.com wrote:
> I have a 'user variable for administrator' variable named 'PATH' and
> this is the value
>
> =80=B7=F8w=FF=FF=FF=FF=F2|=F4w=B3s=F4w=F
3s=F4w=90
>
>
> That's right, gibberish
>
> Then below that under system variables, I have a variable named 'Path'
> that has
>
> C:\Perl\bin\;%SystemRoot%\system32;%Syst
emRoot%;%SystemRoot%\System32\Wbe=

m;C:\PROGRA~1\CA\SHARED~1\SCANEN~1[color
=darkred]
>
> for the value.
>
> I'm still lost. Thanks[/color]

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.

Tim Hammerquist

2005-07-28, 5:01 pm

josephweiss@SPAMMOgmail.com <josephweiss@gmail.com> wrote:
> 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;...
>
> for the value.
>
> I'm still lost. Thanks


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
prawn

2005-07-28, 5:01 pm

josephweiss@SPAMMOgmail.com wrote:
> 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;%Syst
emRoot%;%SystemRoot%\System32\Wbem;C:\PR
OGRA~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

2005-07-28, 5:01 pm

prawn wrote:
> josephweiss@SPAMMOgmail.com wrote:
>
>
> 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>

--
p
josephweiss@SPAMMOgmail.com

2005-07-28, 5:01 pm

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

Tintin

2005-07-29, 10:01 pm


"josephweiss@SPAMMOgmail.com" <josephweiss@gmail.com> wrote in message
news:1122556114.876494.315940@o13g2000cwo.googlegroups.com...
> 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.


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com