LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Very simple question, installing script for Perl (https://www.linuxquestions.org/questions/linux-newbie-8/very-simple-question-installing-script-for-perl-190461/)

lexington 06-06-2004 06:40 PM

Very simple question, installing script for Perl
 
Hello, I have never installed anything using Perl before and I wanted to ask how I go about doing this. I think I understand but I dont want to mess anything up. Here is a copy of the install file:

Overview:
-----------------
Given a file input and file output, it will rewrite your web page for the upcoming W3 standards.

Installation:
-----------------
1) Transfer newhtml.pl into your home directory or the directory where all your files are
2) Chmod this folder to 777
3) Configure the file (read Configuration section)


Configurations:
-----------------
1) Change the location of perl (first line) to the location of perl on your server
2) Change $file to the file name of the .html (or .txt) of the file you want to rewrite
3) Change the $save to a new name you want the new page to be saved as. Common use would be adding the number 1 after the name you called file.

Ie.
$file = "index.html";
$save = "index1.html";



How to use:
-----------------
1) After you make the configurations, run newhtml.pl in your web browser. It will say it's done if everything went okay.

2) Go to the new file it just made, whatever you named $save as, in your browser. If the page loads fine without error, delete the original copy and rename this to the original file name."

My questions are, how do I find the location of my perl server? DO I add this script to my public_html directory so that everyone has access to this script? I am running linux. Thanks

Demonbane 06-07-2004 04:55 AM

Quote:

My questions are, how do I find the location of my perl server?
It meant the location of the perl intepreter itself, if it came with your distro then in most cases it's /usr/bin/perl, so in the first line of your script you put #!/usr/bin/perl
If its not there you can use "whereis perl" to find out
Quote:

DO I add this script to my public_html directory so that everyone has access to this script? I am running linux. Thanks
that actually depends on how Apache is setup, ~/public_html should be ok.


All times are GMT -5. The time now is 11:51 PM.