I'd recommend starting on perl. It gives you more scope, more room to grow, and a much better set of resources for Doing Stuff Right (like perlmonks, and the O'Reilly collection of books on perl, and perldoc to name just three). PHP doesn't come close, unfortunately, there's a lot less around. Perl will get you into better habits (than PHP)if you help it to do so... (use strict; and use warnings; are your friends. I also use diagnostics; while developing).
In terms of use, I follow a fairly simple rule. If it displays to the web, and I can do so, I use php. For everything else (that I do), I use perl.
I find that I can write webstuff faster in PHP than I can in perl (this may be more of a comment on my ability than on perls suitability for task). PHP is limited (realistically) to web scripting (although you can use it for other things). Perl is a language for handling text (which means it also does web stuff very well). To my mind, the limited functionality of PHP is one of its strengths.
Perl, of course, has strengths too. In my opinion, modules are one of the most important. PHP apparently has PEAR which does something similar - I'm not familiar enough to comment there... however I seriously doubt that it comes close to duplicating the sheer breadth of resource provided by CPAN.
Perhaps if you could briefly describe the intended uses of what you're planning on learning, people could provide better/more focused comment?
Malach
So, this baby seal walks into a club.....
|