LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 06-06-2004, 07:40 PM   #1
lexington
Member
 
Registered: Apr 2004
Posts: 53

Rep: Reputation: 15
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
 
Old 06-07-2004, 05:55 AM   #2
Demonbane
Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
simple Perl question true_atlantis Programming 5 11-18-2003 09:37 PM
Simple Perl Question jacksmash Programming 1 11-13-2003 10:17 PM
Simple Perl question! Please help! jacksmash Programming 4 11-07-2003 06:56 AM
Looking for simple way to create scheduled emails from perl script kdowney Programming 1 10-17-2003 07:32 PM
Simple Perl Question Danny.au Programming 6 07-18-2002 10:46 AM


All times are GMT -5. The time now is 12:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration