|
Posted by A. Sinan Unur on May 17, 2008, 8:20 am
Please log in for more thread options
> brian d foy wrote:
>>> I have a Windows Xp and use Strawberry the think is the hello word
>>> doesn't work, and then the others programs as well.
>>> I do "perl filename.pl" in the command line and it gives a error
>>> unknow shell command.
>>
>> As with any other command, the path to it must be in the Windows
>> search path. Can you execute the program with the full path to perl?
>>
>> C:/path/to/perl script.pl
>
> The actual Strawberry 5.10.x (exe-installer) version
> puts itself into %SystemDrive%\strawberry\perl\bin and
> adds two locations to the Windows path (e.g., if the
> system drive is C):
>
> C:\strawberry\perl\bin;C:\strawberry\c\bin;
>
> During the install, there is no option to
> modify or to skip that step. Maybe there's
> only a reboot of the Windows XP required.
A reboot should not be necessary but changes in environment variables will
not be propagated to already open cmd.exe windows.
Out of curiosity, I downloaded Strawberry Perl. I was a little
disappointed that it would not let me install in a different location (I
put certain stuff in c:\opt to avoid paths with spaces) but I guess I
could live with that.
The installer put
C:\strawberry\perl\bin;C:\strawberry\c\bin;
at the end of %PATH%. Well, that is not going to work for me (I have quite
a few Perl installations at the moment). So, I fired up a cmd prompt:
C:\Temp> set PATH=C:\strawberry\c\bin;C:\strawberry\perl\bin;%path%
C:\Temp> perl -V
...
Built under MSWin32
Compiled at Apr 17 2008 11:36:20
@INC:
C:/strawberry/perl/lib
C:/strawberry/perl/site/lib
.
It looks like I am set.
C:\Temp> perl -e "print qq{Hello World\n}"
Hello World
Indeed.
Even my scripts using Win32::OLE work.
Conclusion: The OP's problem seems to be either one of two things:
1) Possible interference with the installation process. Not likely unless
he really went out of his way.
2) Trying to run perl from the same cmd shell used to initiate
installation. In this case, the solution is to start up a new shell.
Sinan
--
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
|