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.....


In reply to Re: php vs. perl by Malach
in thread php vs. perl by NodeReaper

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.