PDA

View Full Version : where online can i learn perl?



Omari
April 25th, 2001, 05:25
i want to find a place online that list a lot of usefull commands and has some simple example scripts.

when i open edit plus and choose to create a new perl file this shows up:

#!/usr/bin/perl

print "Hello, World...\n";

i save it upload it, chmod it, and i get an internal server error...

i found what is apparantly some kind of example perl script, uploaded it, chmoded it... didn't work...

#!/usr/bin/perl
$classname = "CGI Programming 101";
print "Hello there. What is your name?\n";
$you = <STDIN>;
chomp($you);
print "Hello, $you. Welcome to $classname.\n";

so there is obviously much more to even getting a simple script with nothing but text to run than print...

i want to learn how to process form data, save data from a form, open and read files, open and write files, ect ect ect...

lucifer
April 25th, 2001, 10:32
the problem is you need a http header

print "Content-type: text/html\n\n";

before any other prints will sort this out

I learnt from the camel book but I'm sure there's loads on line.

Aaron
April 25th, 2001, 10:55
And that script is for UNIX. It can't run on a webserver.