PDA

View Full Version : Cgi Vs. Perl


eclypto
12-29-2003, 07:08 AM
I need to know which of these laguages is best if I plan to offer message boards, tag boards, and clubs.

I'm about to choose which one to learn and I need to have the design of my website done -completely- by next year.

I need all the help I can get right now if I'm gonna acomplish this. I probably should have waited before buying the site, but...whatever. That's not even what I need right now.

On a previous post http://www.codingforums.com/showthread.php?s=&threadid=30719 , I asked how to create a .cgi file, and/or how to create a message board. I now have the correct code but not enough info on how to put this code on my page correctly. Any help is needed thanks.

Here is the code that he gave me - Please explain it!



#!/usr/bin/perl
use CGI qw(:standard :form);
use strict;

my $cgi = new CGI;

print $cgi->header(-type=>'text/html');
print "Hello\n";

__END__

YUPAPA
12-29-2003, 05:09 PM
the code simply print a message to the screen~
It is the type of '.cgi' file you are talking about. Simply upload the file / write the file via SSH or Telnet, change the permission to the script so that it is executable (0755, 0711, etc) and run it from your browser.

Jeff Mott
12-29-2003, 06:01 PM
Cgi Vs. Perl
I need to know which of these laguages is bestThat's an easy one to answer, since Perl is the only one of the two that is a programming language.

Perl:
- beginners introduction: http://learn.perl.org/library/beginning_perl/
- complete reference: http://www.perldoc.com/

dswimboy
12-31-2003, 08:41 PM
Perl is a complex scripting language. CGI (Common Gateway Interface) can use Perl to process information. By the sounds of it, you waited too long to finish your project on time. It took me quite some time to write good Perl scripts, and i'm still learning.
I learned through O'Reilly's "Learning Perl" and "Perl Cookbook". Learning Perl explains a lot of the syntax in perl, basic ideas. Perl Cookbook applies perl to real world situations.