I don't think Perl is any better or worse than many other languages to learn. I started with BASIC (Commodore V2, BASIC Lightening, BBC BASIC, and finally Turbo BASIC), then tried 6510/6502 machine code, then Pascal (Turbo Pascal and Delphi) then Perl and now XML/XSL-T. Along the way I picked up many good and bad habits, and I still consider my code to be often childish, and inelegant.
CGI is a fun place to play in, and as you say there are lots of things to learn, security being a key one. However it is like driving a Formula One car in a Grand Prix, fun but very dangerous.
Have a look here to see what I mean, lots of keen, well intentioned people, with not a lot of knowledge to go round. Dig deep and you will find a certain famous monk trying hard to teach people what to do - overall you will find he does not have that much luck...
If you are learning Perl and CGI on an isolated machine, and you have access to good books and people to talk to, then it's doable, if you're an unskilled programmer on an exposed production server then you could dig yourself into a very big hole - or worse leave a dirty great hole after you have left*.
I think there is a thin line between fun and dangerous, and I agree that safe programming may be dull, but having seen the results of unsafe programming I'm a bit more cautious now...
*There is some where in the world a production server running an early Perl script that I wrote that allows a remote user to arbitrarily view any file on the server - I can't remove the file as I don't have access anymore, and the current admin is less knowledgeable than I was then...
Update: In reposne to Abigail-II I do not believe that Perl is the best language to learn on, only average when compared with many others. I also wish to stress that I think learning CGI (Perl or otherwise) on an internet connected computer is very unwise. | [reply] |
I don't think Perl is any better or worse than many
other languages to learn.
I think it is. Perl is a powerful, but dangerous language. We don't
learn people how to drive in a Ferrari, people don't learn to fly
in an F-16 jet, nor do people learn to read using Shakespeare plays. Why
should computer languages be any different? Other languages are, IMO,
much more suited to learn programming in. To name a few, Pascal, Python,
Java, Haskell. Probably Eiffel as well.
I also think that Perl isn't a suitable language for everyone. In fact,
I believe that more than 75% of the people currently using Perl should
be using a different language (or maybe not even program at all). The
influx of bad programmers due to the popularity of the web certainly
plays a role here.
Abigail
| [reply] |
CGI applications are excellent introductory projects.
I think you took my statement a little out of context. I didn't mean
CGI *couldn't* be used as introductory material --- I meant that
often people who are trying to learn Perl as their first language are
doing so with CGI applications that are less than introductory in
nature and *without* any real instruction in programming in general.
| [reply] |