Forum Moderators: coopster & phranque

Message Too Old, No Replies

The path to Perl

Where should I start?

         

Jay_R

3:17 pm on Jun 24, 2004 (gmt 0)

10+ Year Member



Sorry for the common question, but I've realized I need to learn pearl and I'm looking for some advice from those who've already been there.

Well, Alright, so all I need right now is a little form emailer, but I just have that, "I need to know how it works" mentallity. I know I can just download something, but I want to understand it before it goes on a clients website.

I have a little programming expereince, and am looking for something that teaches me the basic intricacies of both CGI and pearl. A good reference would be nice too.

Also, I've done a little ANSI-C; is there anything out there that would help broaden the CGI scope to inlude the C's for me?

Eagerly awaiting some guidance,
-Jay

Also, it would be great to hear some advantages/disadvantages to PHP....

stevenmusumeche

3:40 pm on Jun 24, 2004 (gmt 0)

10+ Year Member



You could start be calling the language by its real name: Perl (not Pearl). Then, I suggest you read some online tutorials and write some basic scripts. Then, you could get the camel book.

If you come from a C background, I recommend that you check out PHP, which is in many ways very similar to C.

volatilegx

4:11 pm on Jun 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Perl syntax is also very similar to C syntax.

I found the title of this post funny, because that's probably the most common question I hear about a perl script: "what's the path to perl?"

Of course, for most people it's #!/usr/bin/perl

:)

Besides the Camel book, I would definitely recommend downloading a few free form processing scripts and checking them out. Most of them are well documented, and you'll probably get a very good idea of how they work if you have previous programming experience.

Jay_R

5:18 pm on Jun 24, 2004 (gmt 0)

10+ Year Member



I apologize for the spelling error and the cliche topic. I guess it's a real testament to my inexperience. I really appreciate your time and help dispite my ignorance.

I've been browsing books on PHP and a few on CGI & Perl for the past 2 days without coming to any solid conclusions on what best suites my needs. I strive for good material, so I don't waste my time in the long run.

Your right about the Camel book, it does look like a good reference. But I was looking for something that goes more in depth on CGI and covers some perl basics... I should probably pick up the mouse and the Emu(?) books. If anyone can reccomend anything better than the O'Reilly's, I would appreciate it; they seem like all I own... The animals are good company though...

Again, thank you both for your time...
-Jay

Dave_Baker

6:05 pm on Jun 24, 2004 (gmt 0)

10+ Year Member



Welcome to Perl, Jay!

What kind of application are you trying to build? A web site? If so, what sort of content?

Jay_R

7:32 pm on Jun 24, 2004 (gmt 0)

10+ Year Member



Thanks Dave,

I appreciate your interest. I'm just a kid who's a couple years out of the Air Force perusing a computer engineering degree. I do web stuff in my spare time.

Right now, I just need a little FormMail CGI, but I'm looking for advice on the best tools to form a working knowledge of the language and the interface. So for the future, I'll be better equipped.

Regards,
-Jay

Dave_Baker

7:51 pm on Jun 24, 2004 (gmt 0)

10+ Year Member



There's a terrific free form-mail script at this page:

[nms-cgi.sourceforge.net...]

It's been written by a group of Perl coders in England (the "nms project"). It's better than many of the form-mail scripts because it is incapable of being hijacked by spammers to send out spam via the form. An earlier version of such a script has been widely used on the net, and is now the source of a good deal of spam. I'm using the nms script now on my site.

Does your Internet Service Provider have perl installed already? Do you have a "cgi-bin" directory on your server that you can upload files to? That's where the perl script will go.

coopster

8:08 pm on Jun 24, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Since you mentioned CGI and Perl, and you are here at WebmasterWorld, I'll assume you are going to be focusing on using perl for web development. One of the better books I have seen is PERL and CGI for the World Wide Web by Elizabeth Castro. She does a good job getting you rolling in web development with simple, easy to read and understand examples. Then, as has been mentioned, the Camel book (Programming Perl, by Larry Wall et al) is one of the most extensive resources you'll find in hardcopy when it comes to the complete language (they refer to it as the undisputed bible of the language). The perl website is also loaded with information.

As you begin digging in and developing, don't hesitate to search WebmasterWorld or ask a new question if you run into obstacles, need clarification or just plain direction on what's next. Best wishes!

Resources:
The Common Gateway Interface (CGI) [hoohoo.ncsa.uiuc.edu]
Perl [perl.com]

As far as the advantages/disadvantages of PHP vs Perl? This is a topic that gets hashed and rehashed waaaaayyyyy to often. Do a search on this forum and you'll get plenty of reading. Expand the search to the entire web and you'll get even more.

Jay_R

8:20 pm on Jun 24, 2004 (gmt 0)

10+ Year Member



Thanks again,

I'll check that out script, with a couple learning resources, maybe I can get my head around it. And yes, I have the good ole CGI-bin, but i have a couple of them, one in every sub domain folder I think. I'm sure anything good will explain why though...

Yeah, Spam sure is the black plague of the internet, doesn't seem to be any lack of ingenuity in the methods used for harvesting email addresses.

Coopster,
Thanks, I also check out those resources. I'm sure they'll be helpful. Your right about the PHP/Pearl being exhaustively dueled over. I'm a real middle of the road kinda guy, and I'm sure they both have their strengths and weaknesses. Academically, I think I'm going to investigate both...

-Jay

VectorJ

8:25 pm on Jun 24, 2004 (gmt 0)

10+ Year Member



I just wanted to second coopster's recommendation of "PERL and CGI for the World Wide Web" by Elizabeth Castro. It was my first Perl book and I found it invaluable.

Jay_R

8:40 pm on Jun 24, 2004 (gmt 0)

10+ Year Member



Thanks VectorJ,

I will check out coopster's reccomendation, even the title sounds like it is exacly what I am looking for.

-Jay