Previous Thread
Next Thread
Print Thread
Hop To
#86868 01/22/2004 8:27 PM
Joined: Dec 2003
Posts: 53
J
journeyman
journeyman
J Offline
Joined: Dec 2003
Posts: 53
What is a good way to learn cgi script? Books, software, classes? How did you guys who work with it learn it? Thanks in advance.


Joshua Pettit
Web Developer - www.JoshuaPettit.com
#86869 01/22/2004 8:48 PM
Joined: Jul 2006
Posts: 2,143
Pooh-Bah
Pooh-Bah
Joined: Jul 2006
Posts: 2,143
The first thing you need to do is learn the terminology. <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />

CGI is the interface between the web server software (such as Apache and IIS) and an application, such as Perl.

Perl on the web is often accessed as a CGI. (There are other ways, but they won't matter until much later on...)

I learned Perl by hacking on late 4-series and early 5-series code. <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" /> I later had formal training when I obtained a Unix Sysadmin certification.

Unfortunately, I would not advise using the 6-series code as a learning point. The code uses a number of constructs and techniques that are complex at best (the way the control panel pages are generated and the import/export tool) and scary at worst (FileHandle/FileHandler and PNTF - code I deserve to be embarassed about <img src="https://www.ubbcentral.com/boards/images/graemlins/blush.gif" alt="" /> ).

UBB.threads, on the other hand, is written very clearly and would be an excellent way to learn PHP.

Classes at your local community college would be a great bet, if they're available and you can afford them. Having someone there with you one-on-one is the best way to learn.

Books... Learning Perl, 3rd Edition from O'Reilly is the cannonical book.

Online... Picking Up Perl is a freely distributable book in PDF format that covers the basics.

The UBB, of course, isn't just Perl. The Accelerator is written in PHP. The basic concepts of PHP are almost exactly the same as those of Perl, so knowing one makes it easy to pick up the other. Many claim that PHP is easier to learn than Perl. I find that statement to be a bit misleading... PHP isn't easier than Perl, it's just initially not as potentially confusing and doesn't use as much "line noise."

(IMO - the general superiority of Perl as a language doesn't really make itself known or needed until you're building large applications. This is where the "easy to learn" edge of PHP quickly becomes a burden. While they're adding some pretty nifty ways to help that particular problem in PHP5, they aren't doing enough, IMO, to make it a robust enough language. Intentionally leaving out namespaces, user defined superglobals, and operator overloading severely limits the flexability of the language...)

Anyway, back on topic.

One of the core Perl mottos is "There's More Than One Way To Do It"... Perl is a VERY flexable language. There are often dozens of ways to do one thing within the syntax of the language. (This can sometimes lead to interesting problems - one of the UBB.x/Eve developers is a Perl hacker as well, and has found himself often coding in the Java style in Perl and getting away with it. <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" /> )

This trait has given Perl a bad reputation. It may not be obvious at first glance what a particular bit of code does.

Still, I feel that you'll at least have an interesting time if you choose to learn Perl... <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" />


This thread for sale. Click here! [Linked Image from navaho.infopop.cc]

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
1 members (Napalm), 806 guests, and 165 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)