Jump to content
xisto Community
rantsh

Perl Vs Php Whats in your website?... and why?

Perl Vs PHP  

You do not have permission to vote in this poll, or see the poll results. Please sign in or register to vote in this poll.

Recommended Posts

Perl Vs Php - WhatPerl Vs Php

I've used PHP to great extents (I'm a Zend Certified engineer myself) and I know Perl too. But with the arrival of PHP 5.3 (and PHP 6) in the queue, to me it seems that now PHP has raised itself to very close to Perl and still being superior in Web Development. PHP CLI (Command line interface) is as great as of Perl's CLI. Socket programming and Networking programming are all there. The only thing which is not there is the complexity and a mysterious charm, which still lies around the Perl :)

For me both are reputed, popular, robust and powerful, the difference is the breeds (generations) of programmers, which are using them..

Amit Verma,India

-reply by Amit Verma

Share this post


Link to post
Share on other sites
Perl vs PHPPerl Vs Php

All programming languages have strengths and weaknesses. Much depends on what type of problem you are solving. I have been working with Perl since 1998 and picked up PHP in 2008. The backend ETL for my database was done in Perl(5.10.1) due to the enormous parsing required. The front-end was done in PHP 5.3 due to my desire to learn PHP. Both PHP and Perl are being called through AJAX functions.Here are some of comments:1. Perl is a very easy language to learn. With 3 half-hour sessions, my 12 year old nephew picked up the language and has been writing little snippets of code. 8 weeks later he has figured out how to use VIM as an editor, downloaded Perl/Tk, uses PPM, and is running. Granted, he is not your average 12 year old. He lives in another town and we communicate through phone and email. Sure the kid had a strong desire to learn. But he did not see Perl as formidable. Sure, Perl allows you to write to very cryptic code but you do not need to write one liners.2:Comming from a C/C++ background, Perl seemed to very much like C with the added power of the UNIX AWK language. For me it seemed a natural transition. My early misgivings was no support for multi-dimensional arrays but once you understand pointers, this is a non-issue. And no serious programing or complex data structures can be realized without a knowledge of pointers. And I with memory dynamic allocation, who needs to worry about malloc(), alloc(), and dealloc(). The other annoyance was the lack of a switch statement which was eventually added in Perl 5.10 in 2008.3. For automation work, Perl is amazing. Arrays can be manipulated as both stacks and shift-registers. Hashes (associative arrays) just make everything possible. And of course, Perl is the Mother of All Languages when it comes to Regular Expressions. And I love that fact that I differentiate scalars, arrays, and hashes by the $,@, and % prefixes.4. Perl supports modular programming. My ETL backend program for my database has loaded with no problems some 100 Million Records from factory testing in the last 3 years. The application consists of some 25 modules and 5,000 lines of code.5. No large programming effort can be under taken without having a strict mode for variable declaration. PHP does not seem to have a straight forward way of doing this. Starting with Perl 5.12, strict mode is now the default.6. The interface to MySQL via Perl or PHP seems to be equally easy. If PHP can run web applications faster, then that would be a factor. But I do not know if this is the case.7. The CPAN library is amazing. I have used it for Networking, DBI, Tk, EXCEL, and many other needs.8. A company called ActiveState has a DevKit application that will wrap you r application in an executable. So I can simply ship my executable to different factories without worrying about whether or not that machine has Perl and the right libraries loaded on them.9. While I am not a PHP expert, it seems somewhat similar to Perl. Though using Regular Expressions in PHP is somewhat annoying compared to the ease and power of Regexes in Perl.10. While PHP does allow mixing PHP within HTML code, this is somewhat gone with AJAX and Web 2.0. JQuery and Javascript have now pushed all code out of HTML. Behaviour is controlled through classes and ids tied to callback functions. While this could have been an advantage in the past, writing code like this means you are still living in Web 1.0.11. Object-Oriented Programming is supported in Perl. I have used it in one application. But having done OO in C++, it is probably somewhat of an afterthought. Most of applications are not of an OO nature so that does not bother me.In a nutshell, one seems to stick with a language that he/she is proficient in as long as it does the job well. When I advised my nephew what language to pick as his first, Perl was the advice. And it seems that it worked out well.Just another opinion ...AbcParsing

-reply by abcParsing

Share this post


Link to post
Share on other sites

I think people who are older and learned Perl years ago, can really remember it with nostalgia how they used it and how great it was and of course is, I know a guy who still prefers to use Perl for where he can, but usually at his office, he needs to use the technologies which he is told to use ;)I personally use PHP for web development, Oracle with pl/sql for things with DB and sometimes Java where needed, also I tried python and I really liked it, I think it may become the scripting language of choice as it's really good!Perl is really popular for regular expressions and manipulation of strings, PHP on the other hand is trolled by a lot of people that it's a strange language, it's purpose is for the web, yes, but it's structure is quite strange and not strict at all, function names differences and etc. it seems it's a language which copies everything from other languages as it's syntax can do that and that, for the same thing, it steals syntax from other languages and puts it in use? :lol:Moreover, languages like perl, php made Java usage drop by popularity a lot since the year 2000, if most of people used java for things on web and etc. a lot of who Today use PHP, Python and etc.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.