As you can probably already tell, this request has the potential for starting a flame war... except that you asked it on a perl forum, where you're not too likely to get a lot of dissent. :-)

I use PHP and perl daily. The websites where I work are run on PHP, and the decision to do so was made before I ever started working there. Now that I've been using PHP regularly, I find I like the convenience of access to various CGI interfaces -- the GET and POST hashes, sessions, cookies, headers, etc. Since it was designed with the web in mind, it's all easy.

I still like perl, and have it running my own website. With mod_perl, perl is incredibly fast in a web environment and your objects stay resident in memory, giving some incredible flexibility. You just have to put a little more work into it to get things working correctly together.

Surprisingly, I find myself using PHP increasingly for anything database related because I know already that the database functionality I need is already compiled into the language, and because PEAR::DB is so dang easy to use. This means I use PHP for both web applications and CLI scripting. It works fine in both environments.

I find myself using perl primarily for processing text or when I need to run processes in parallel. Perl makes forking incredibly easy, and with tools like Parallel::ForkManager, it's even easier. As for processing text, well, that's what perl's best at, as far as I'm concerned. The regex engine is so great that many other languages borrow it for themselves (PHP's pcre functions, for instance).

What it comes down to is, what do you know already? You say you're 'decently familiar with Perl,' but in the same paragraph say you haven't done web or database programming using perl -- and the project you outline will have a lot to do with each. I personally feel that at this point you simply have to decide what language you want to learn most -- and then go to it full-bore.

Additionally, you mention you'll be doing a shopping cart. This is not a light project to tackle. Make sure you do a lot of research before getting too involved. Do not store credit card numbers in your database, at any cost -- simply pass them on to a processing agency. You can not afford the liability, period.

P.S. My personal preference when developing a new site, now that I've been using PHP regularly, is PHP. It's what it was designed for, and I find it's easy to just get things done for web-related work when using that language. You have to jump through too many hoops when using perl, even when using standard modules like CGI, to do the simple things like tracking sessions and getting the page parameters. And I'm lazy. :-)


In reply to Re: Perl/CGI Vs PHP Vs ASP by weierophinney
in thread Perl/CGI Vs PHP Vs ASP by sk

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.