Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running perl locally

Status
Not open for further replies.

Zas

Programmer
Oct 4, 2002
211
US
Ok, this may be a bit newbish of a question. I've downloaded most of the programs, used most of the paths, but everytime I run a perl script, it comes up like an oddly shapen notepad/webpage thing... I have c:/perl/bin/perl.exe but can't figure out what the correct path to my perl is, and why the scripts aren't working locally, but they are on the actualy web.
I have a windows XP, and am trying to convert my site into local PC. The other people are getting the same problem.

This:
#!/usr/local/bin/perl -wc
use CGI::Carp qw(fatalsToBrowser);
# Author name:
# Creation date:
#
# Description:
#
$lcpassl = lc($INPUT{'passl'});
$lccname = lc($INPUT{'cname'});
$cid = "/user/$lccname/$lcpassl";
$aip = $ENV{'REMOTE_ADDR'};
open(DAT, &quot;$cid.txt&quot;); @DAT=<DAT>; close DAT;
foreach $line (@DAT) { ($cname, $pass, $sex, $align, $icon, $hcolor, $ecolor, $pet,
$chi, $str, $dex, $luck, $force, $sa, $sl, $race, $job, $email, $age, $rdir, $gold,
$power) = split(/\:\:/, $line); for ($cname, $pass, $sex, $align, $icon, $hcolor,
$ecolor, $pet, $chi, $str, $dex, $luck, $force, $sa, $sl, $race, $job, $email,
$age, $rdir, $gold, $power) {s/^\s+//;s/\s+$//;}}
$lcpass = lc($pass);
open(DEATH, &quot;$rdir/dead.txt&quot;);$DEATH = <DEATH>;@DEATH = split /::/, $DEATH;close
DEATH;
foreach $dead (@DEATH) {
if(($lcpass eq $lcpassl) && ($dead ne $lccname)) { print &quot;Set-Cookie: NAME=$cid\n&quot;;
}
}
print &quot;Content-type: text/html\n\n&quot;;
print &quot;<body bgcolor=\&quot;black\&quot; text=\&quot;white\&quot;>&quot;;



print &quot;hehe, so cool&quot;;

still comes up as this:

thank you for all your future help, yours sincerely, Zas.

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
Lol, i figured that IIS was the only way to do PERL on the system because thats what all the tutorials were about, and everyone was pointing me kindly in that direction. It would be nice if someone would explain about Linux systems, how they coinside with Windows XP, and how to run PERL off of them.
Thanks

Happieness is like peeing your pants.
Everyone can see it, but only you can feel the warmth.
 
Zas,

You can run Apache on Win32 systems. I'd recommend this versus IIS. If you want a more lightwieght webserver capable of CGI support have a look at Xitami from imatix.com

HTH
--Paul
 
Zas, linux runs on very cheap hardware, especially if you don't plan on running X-Windows. My production server, which hosts about a dozen websites and several dozen email accounts is only an AMD K6 450MHz w/256M RAM (previously only 128M). So rather than trying to dual-boot/cygwin/vmware with Windows XP, just get yourself another cheap box. A $99 computer from Walmart would be fine. Or an old PII system that you or someone you know doesn't use anymore. Or even a hacked X-box ;). Remember, just a few years ago, most webservers on the net were sub-200MHz boxes running linux. You can use a KVM switch to share a monitor; though, after installation, you don't really need one anymore since you can do everything via SSH, FTP, Webmin, etc.

As for which distribution to use, there are many to choose from... Knoppix would be a good starting point just to get your feet wet -- it's a distribution on a CD that doesn't need to be installed, it just boots off the CD and autodetects everything. For a permanent distribution that you install to your HD, you could simply install Knoppix, or you could choose an &quot;easy install&quot; distro such as Mandrake. By default, the above two will install X-Windows, so you should choose not to do that if running on excessively cheap hardware (read their websites for min reqs), but go ahead otherwise. If you really want to learn how your linux system works, the best bet is to use Gentoo -- it walks you through a custom installation procedure which familiarizes you with the internals of the system. You could also use the Gentoo install CD as a &quot;Live CD&quot; like Knoppix, since it will autodetect most of your hardware and give you a shell prompt without installing anything yet, but it will provide vastly less software at this stage than Knoppix. Finally, a last option would be to choose a &quot;security hardened&quot; linux distro which is more minimalist and customized for running on a server. These generally require more expertise though. You can get a long list of linux distros with links to their websites at
There are lots of tutorials on the web for using linux, including at the website of your distro of choice. Tek-tips has several linux fora as well, including FAQs. You could also get a &quot;dummies&quot; type of book, though I can't personally recommend any. Try clicking over to the TT linux server or linux desktop forum for more advice.

Sincerely,

Tom Anderson
Order amid Chaos, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top