Home > Archive > PERL Beginners > June 2006 > Windows XP ppm and perldoc problems
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 |
Windows XP ppm and perldoc problems
|
|
| jovo.miskin@sciatl.com 2006-06-27, 6:57 pm |
| I have installed Active Perl v5.8.7 build 813 on WindowsXP machine.
Executing PPM gives this output:
C:\Perl\bin>ppm
Unknown or ambiguous command '*'; type 'help' for commands.
C:\Perl\bin>
Executing perldoc gives this output:
C:\Perl\bin>perldoc -f gmtime
Syntax error
Bad command or file name
C:\Perl\bin>
I've tried reinstalling Active Perl a few times, but the problem
persisted.
Any idea, what is wrong in my setup, preventing these utilities to
execute properly ?
Thanks in advance !
| |
| e_matthes@hotmail.com 2006-06-27, 6:57 pm |
| What do you get with perl -v?
| |
| e_matthes@hotmail.com 2006-06-27, 6:57 pm |
| Elaboration: It sounds like your system can't find the perl
interpreter. Do you know how to check the system's path variable? If
you don't:
- Right click "My Computer"
- Select "Properties"
- Click "Advanced" tab
- Click "Environment Variables"
- In the "System Variables" section, scroll down until you see "Path"
- Double click this variable, so you can read through all the path
variables that might be there.
You should see something like this "C:\Phperl3\mysql\bin" somewhere in
that variable. If this is nowhere in your path variable, then your
computer won't be able to find the perl interpreter and won't be able
to run any perl programs.
If it's missing, you want to add the path to your perl interpreter onto
the end of the existing list of path variables. Scroll over to the
right until you are at the end of the list of variables. Enter a
semicolon to add a new path variable. Then add the path to your
system's perl interpreter. This is probably "C:\Perl\bin", if your
activestate setup is like mine. When you have the path variable
entered, click ok out of all those dialog boxes, open a new command
prompt window, and try perl -v again. This will tell you if the
interpreter is working.
Eric
| |
| jovo.miskin@sciatl.com 2006-06-28, 7:59 am |
| Eric,
I do have Perl in my path.
This is what I get out of perl -v:
C:\Documents and Settings\miskinj>perl -v
This is perl, v5.8.7 built for MSWin32-x86-multi-thread
(with 7 registered patches, see perl -V for more detail)
Copyright 1987-2005, Larry Wall
Binary build 813 [148120] provided by ActiveState
http://www.ActiveState.com
ActiveState is a division of Sophos.
Built Jun 6 2005 13:36:37
Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5 source
kit.
Complete documentation for Perl, including FAQ lists, should be found
on
this system using `man perl' or `perldoc perl'. If you have access to
the
Internet, point your browser at http://www.perl.org/, the Perl Home
Page.
C:\Documents and Settings\miskinj>
Thanks.
Jovo
| |
| jovo.miskin@sciatl.com 2006-06-28, 6:57 pm |
|
The problem seem to be specific to passing arguments to system call.
Let' say we create a perl script called sys_args.pl that contanis the
next two lines:
#my $opt_exe = "ppm3-bin";
system($opt_exe, @ARGV);
And also we add at the top of ppm3-bin next two lines:
my $numargs = scalar @ARGV;
print "in ppm3_bin, numargs = $numargs\n";
The command line
sys_args.pl
produces output
in ppm3_bin, numargs = 1
The command line
sys_args.pl 1 2 3
produces output
in ppm3_bin, numargs = 1
Jovo
| |
| e_matthes@hotmail.com 2006-06-29, 3:57 am |
| This is beyond my understanding right now. Good luck.
Eric
| |
| jovo.miskin@sciatl.com 2006-06-29, 6:58 pm |
|
In previous message, the first line in sys_args.pl is not meant to be
commented out.
Jovo
| |
| DJ Stunks 2006-06-29, 6:58 pm |
| jovo.miskin@sciatl.com wrote:
> The problem seem to be specific to passing arguments to system call.
>
> Let' say we create a perl script called sys_args.pl that contanis the
> next two lines:
> #my $opt_exe = "ppm3-bin";
> system($opt_exe, @ARGV);
>
> And also we add at the top of ppm3-bin next two lines:
> my $numargs = scalar @ARGV;
> print "in ppm3_bin, numargs = $numargs\n";
>
> The command line
> sys_args.pl
> produces output
> in ppm3_bin, numargs = 1
>
> The command line
> sys_args.pl 1 2 3
> produces output
> in ppm3_bin, numargs = 1
>
> Jovo
try this:
http://groups.google.com/group/perl...e6502ee06e5a7c5
-jp
| |
|
|
|
|
|