Hi,

I am confused...

"What is the big deal with WORSHIPING Perl?"

Time and again I encounter on the web statements like this: "...when you reach a proficiency with PHP, you will most likely be armed with enough background knowledge to start thinking about Perl or ...".

I answer to this with a question: "If I reach a proficiency with PHP, why would I ever need this beast 'Perl', especially in web site development?"

There are lots of Perl based sites, which should be maintained - I understand that (just like COBOL). But when there is a choice of PHP at the start of the project, then why in the world would you choose Perl?

It's like a story with the old car - over the time you get attached to it (maybe it saved your life, who knows?!), and even if you buy a new car, you still feel sentimental about your old one.

I've been developing sites with PHP for almost 2 years and there wasn't any single situation when I found PHP helpless in solving my problems. Ironically, in my present company, the requirement for the job was 'strong knowledge of Perl', which we use less and less and less...(only for old sites or when ISPs don't support PHP)

Please don't flame me - I don't intend to trash the language, but give me some examples or even imaginary situations when you will definitely prefer Perl to PHP. Is it speed? Efficiency? Security? Stability? or What? Come on, man... The only time I will use Perl is when there isn't PHP around!

Let me get it straight - my knowledge of Perl might be limitted, but any time I try to solve a problem with Perl, a more elegant solution with PHP is always knocking at the door.

I would really appreciate it if someone shares his experience on the matter.

Thank you,

Ales 🙂

    Perl shines as a glue language for quick scripts written for server maintenance by power users and sysadmins. For web use PHP outshines Perl in most departments. In any case I wouldn't let it bother you. And if you want to be a credit to the PHP community don't get involved in petty flamewars.

      I just plain like PHP better because of it's obvious roots with HTML and how it can easily be combined.

        Mixing PHP into HTML always looks messy, although tempaltes make it look great

          ok.. i'll bite on this one... you should really ask this question from both sides.. try posting your question at www.perlmonks.com and see what you get there. Bear in mind that i'm still a php newbie for the most part. and alot of this is from that perspective..
          ok, on to the question..
          maturity is definitely a factor.. while php is nice and easy to learn, it's development life is still somewhat short. CPAN is a massive archive of useful modules, of which i've not seen a comparison with php (PEAR is working on that)..
          alot of php's functions seem clumsy...
          php's string handling seems very weak in comparison to what perl offers. it's regex functions are just lacking.
          i've had problems with php's reference passing
          i do some work where i need both online and offline process.. in a case like this, when i've built an object to deal with my needs it makes much more sense to use perl than php, since i don't think php is practical as a general scripting lang and i'd rather reuse than rewrite..
          anyway that's some of the basic things i've come across..
          -Syn

            I haven't really learned about templates and start using them until now, but they're an extremely HUGE help

              4 months later

              hi,

              my 2c, i've also used a while PHP .. and believe I was't at home ... it lack alot of things.... Some stuff i ddin't liked in PHP.

              1. Sessions support are clumsy... try to store some more complex structure and u will want to forget about them (it uses text-file, and even that u can write your own i though on this site was some info how to do it yourself...). Then what about Perl u can use Apache::Session or Apache::ASP as one example..
                Even on the version of PHP I used at the begining I have to use serialize()/unserialize() /that was the name of the functions, aren't it/ to store complex structures... I made an upgrade later :"(
                May be they are OK now ?? are they ?

              2. Gosh one thousand functions to do very similar things ... How u ppl remember them...

              3. Installation was pain..:"), I know there is prebuild packages but this wasn't my case 'cause I had to add it to already running Apache/Linux instalation..

              4. DB access is poor.. i mean as functionality compared to DBI !!

              5. It may be cute to have a GET and POST parsed as variables, but guys this is major security hole !!! Disable them by default and use HTTP_blah hashes instead ... yeah this way your script becomes more uglier.

              6. require(), include() and include_once() was very annoing to me... may be 'cause I'm used to Perl behavior.., so this I think is not bad for the PHP-newscomers

              7. For the speed comparison.. i looked around on the NET and it seems mod_perl and PHP had almost the same speed, sometimes PHP beats sometimes mod_perl beats.. but if we compare the functionality we have in Perl is much more than in this available PHP as a core-language. So as the new feautures are added to PHP it will most probably slow down rathar than to speed up.

              I feel PHP like Perl with broken legs and hands cut-off :") if we compare functionality..
              But for comparison U can compare : PHP with Template-Toolkit(www.template-toolkit.com -written in Perl). :")

              Please bear in mind that this is just my opinoin and I can be a little bit biased.. so apologies if u do not agree with me.
              But still I'm talking about my expirience with PHP.

                Write a Reply...