perl and xampp

Problems with the Windows version of XAMPP, questions, comments, and anything related.

perl and xampp

Postby Mr_PieChee » 30. December 2005 16:21

well first off i'm not sure weather this should be here or with the perl stuff.

and the problem
for a stat i have no idea how to run perl programs. secondly the perl add on sasy the version of xampp isn't late enough when its the latest version i can download and its about the version its askign for. i ran the update to update it to the version it is already which made no difference.

so how do i run perl programs and how do i get the perl add on to work?
Mr_PieChee
 
Posts: 12
Joined: 30. December 2005 11:23

Postby alucard01 » 01. February 2006 17:07

Try to help here:

I use the very latest XAMPP(Apache 2.2) and Perl Addon for apache 2.2.

After following what the readme-addon-perl.txt specificed, you can place your perl script into x:\xampp\htdocs\modperl. And run your script using windows command prompt(cmd) under this directory.

e.g. my xampp is under C:\, my full path to modperl is:
c:\xampp\htdocs\modperl\

let say I have a perl script called myFirstPerl.pl, this file will be placed under c:\xampp\htdocs\modperl\myFirstPerl.pl. Then start command prompt, change your directory to c:\xampp\htdocs\modperl, then run: perl myFirstPerl.pl, Your perl script should work.

OK, you can also edit your system PATH variable to include the c:\xampp\htdocs\modperl. Doing this will make you avoid from manually changing the directory in command prompt.

BTW, you can see x:\xampp\apache\conf\extra\perl.conf for reference.

Hope it helps.
alucard01
 
Posts: 122
Joined: 15. May 2005 13:51

Postby Mr_PieChee » 02. February 2006 22:20

cool... thanks for the help, very much appreciated

[edit] ok... i can't get it to work.. i'm using run in the start bar... i take it i should be opening one of the pearl line interpreters (of which the are 4+) and tyeping in the command to run a program(which i don't know....)
Mr_PieChee
 
Posts: 12
Joined: 30. December 2005 11:23

Postby alucard01 » 03. February 2006 14:33

Ok, you are unable to run your perl code in command prompt right?

Try this:

open your command prompt, and change to the direcotory which resides your perl code. for example, if there is a perl code called hello_world.pl, resided in c:\xampp\htdocs\modperl, you should type in your command prompt:

cd c:\xampp\htdocs\modperl

once in the working directory, type:

perl hello_world.pl

The perl code will be run automatically.

Hope it helps. If I misunderstand your meaning, please let me know.
alucard01
 
Posts: 122
Joined: 15. May 2005 13:51

Postby Mr_PieChee » 04. February 2006 17:50

i got all that now but i got a prob.. when i type teh "perl simple.pl" (simple being the file) i get this 'error'
'perl' is not reconised as an internal or external command, operatable program or batch file

not sure what to do now.... are you using the normal windows command promt or a xampp perl one?
Mr_PieChee
 
Posts: 12
Joined: 30. December 2005 11:23

Postby alucard01 » 04. February 2006 18:47

Hi

I use normal windows CMD.

Probably you haven't set the system PATH variable, which make your system cannot find the perl command. To make your Windows find your perl command, you should setup the system PATH variable by doing the following:

1. right click "My Computer" > properties, or go to control panel > system
2. A window appear, find and click on "Advance" tags
3. At the bottom of this window, click the "Environment variable" button (underscore N)
4. Another small window appear, in the system variable list (the bottom one), find and select the variable called "PATH", and click "Edit"
5. In the variable value input field (the bottom input field), enter the path to perl/bin, REMEMBER KEEP ALL EXISTING VALUE UNCHANGE.

For example, BEFORE CHANGE, the value is:

%SystemRoot%\system32;%SystemRoot%;...

AFTER CHANGE (assume your perl bin dir is in c:\xampp\perl\bin):

c:\xampp\perl\bin;%SystemRoot%\system32;%SystemRoot%;...

remember to put a semi-colon(;) between each path value.

Hope it helps.
alucard01
 
Posts: 122
Joined: 15. May 2005 13:51

Postby Mr_PieChee » 04. February 2006 23:30

wow.. it works.. thats dude.. its things like that that should be added to the FAQ's......
Mr_PieChee
 
Posts: 12
Joined: 30. December 2005 11:23


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 147 guests