SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: PHP vs. Perl

  1. #1
    SitePoint Member
    Join Date
    Oct 2002
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP vs. Perl

    Hi,

    I'm new here - been lurking for awhile but this is my first post.

    I am interested in learning either PHP or Perl for server side development of some scripts I would like to develop.

    Which should I go with first?

    Which is the fastest?

    Which is the easiest to learn?

    Which is the most powerful?

    Which is the most secure?

    Thanks for any opinions.

  2. #2
    SitePoint Enthusiast
    Join Date
    Oct 2002
    Location
    Utah
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which should I go with first?
    I would suggest learning php first, would probabaly be a bit easier to learn then perl.

    Which is the fastest?
    Probably php most of the time, maybe perl for doing alot in a short period of time, it just depends on what your doing though.

    Which is the easiest to learn?
    Probabaly PHP

    Which is the most powerful?
    I'll have to go with perl on that one, however I think PHP would be better for web design purpouses.

    Which is the most secure?
    I don't know, I guess it depends on the script or program.

    Hope that helps you out in deciding a bit.

  3. #3
    webality...dunno what it means bcp_2005's Avatar
    Join Date
    Jun 2002
    Location
    Huntsville Alabama
    Posts
    394
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First, welcome to SitePoint! Hope you stick around!

    Now to your question. I learned PHP. I tried Perl but never quite did get the hang of it. PHP is pretty straight forward. Get the basics down and a copy of the reference in front of you and you've got it made. It's also VERY fast to program.

    Anyways, hope that helps...
    [ metabahn ] : changing the course of the web.

  4. #4
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: PHP vs. Perl

    I'll go at it with my own answers

    >>I'm new here - been lurking for awhile but this is my first post.
    Welcome then. Introduce yourself in the Introductions forum so we all can get to know you .

    >>Which should I go with first?
    PHP. For the simple reason that it is the easiest server-side language to learn, esp. if it's your first language.

    >>Which is the fastest?
    Generally PHP is faster. Plain old Perl CGI is considerably slower because the server spawns off a new process for each CGI request. Fast CGI and mod_perl does make Perl scripts run faster but PHP is still faster.

    >>Which is the easiest to learn?
    As before, PHP. Perl syntax is, well, 'un-programming-like'. It's syntax is certainly unconventional (conventional meaning language syntax as in C, Java, Smalltalk, Python) and imho if you start with Perl first, there'd be many things you'd later have to unlearn when you move to a different language. For me, I learnt PHP first and then Perl and even with a background in PHP, C, Java and Python, Perl was still a toughie.

    >>Which is the most powerful?
    Pretty much the same. In terms of web programming I mean. Perl is actually a general scripting language (PHP is more geared towards web dev). You can do lots of things with Perl but if you're using Perl mainly for your web pages, you're still better off sticking with PHP.

    PHP has lots of extensions and modules which allow you to do a myriad of things. Perl has CPAN where there are modules for just about anything you want to do.

    One good thing about Perl though is it's extremely powerful string manipulation and regular expression library. If you do a lot of file parsing, etc. Perl is the way to go.

    >>Which is the most secure?
    Like deadserious said, security depends more on how you write your script then on the language in itself.

    Hope this helps .

  5. #5
    SitePoint Member
    Join Date
    Oct 2002
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for all the responses.

    I was leaning towards PHP anyway. I just wanted to hear from others. I've looked at Perl and PHP source code and could actually understand more of the PHP without knowing anything about the language itself.

    So it sounds like PHP it is.

    Again thanks.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •