Jump to content



Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!

Replying to Perl Vs Php


Post Options

    • Can't make it out? Click here to generate a new image

  or Cancel


Topic Summary

Quatrux

Posted 25 August 2011 - 01:19 PM

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.

Posted 20 August 2011 - 03:06 PM

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


Posted 16 October 2009 - 08:34 AM

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


Posted 31 August 2008 - 11:06 AM

My PHP vs Perl Experience
Perl Vs Php

I first used Perl to write an AJAX chatroom back in 2006. Yep, people were doing AJAX even then, they just didn't know it was to be called that :)

Anyway, With anything over 100 simultaneous connections to the server the server loads went through the roof anf file locking started to fail. I therefore rewrote the time critical sections in C which vastly improved things.

After some years I decided to rewrite the chat from the bottom um in PHP. It can easily handle thousands of concurrent connections, file locking doesn't fail and since I started using PHP I have not had to recompile any code into C.

This is just one example. There are many other very trafficed servers I have worked on in PHP that perform vastly better than Perl. I know that Perl has been through a few revisions and is supposed to be much better, but I see no reason to go back when I can achieve anything I need quickly and easily in PHP.

-reply by Robin

Posted 06 June 2008 - 09:41 AM

PHP vs Perl
Perl Vs Php

I know both languages extensively, the former out of sheer love, the later because of customers ( ;-) )

I restrict my view on Web programming, for PHP will never standas a serious contender outside this area.

Lack of orthogonality, lack of high level semantic primitives (curryfication, closures, scopes, contexts,...), faulty designs (for instance the poor hash/array PHP array data type), poor quality PEAR repository, have me definitely convinced that PHP is only good for micky mouse projects.

The fact that some good size projects may have seen the light does not prove otherwise.

After all, computer languages are T�ring.

So the point of chosing a language is not "will I be able to complete the task ?" (obviously you will if you are not trisomic), but "how efficiently will I be able to complete the task?"

Source code for many mid-size PHP projects (PHPBB, PHPMySQLADMIN, ...) is awful. Have a look for yourself, and be amazed.

"Patch over bugs" seems to be the standard "quality procedure" in PHP coding and litteracy.

Obviously at the end, it works... But only because it has to !

My experience in developing higly complex web applications in PHP has been a nightmare.

It has proven to be overkill time consuming compared to what the same thing done right in Perl combined with a profesional grade templating system like CGI::Forge or WWW::Forge (Franck PORCHER - Smart Technologies Tahiti - www.Smartech.Pf).

So my definite answer, without a doubt, is "if you have to choose between PHP and Perl for Web programming"... Choose Perl, you will always win at the end.

I'm convinced that Perl is easier to learn than PHP, far more richer, far more powerful, and not restricted to Web programming.

Franck PORCHER



-reply by Franck PORCHER

Samya

Posted 21 March 2006 - 10:21 AM

I will prefer PHP.
There is no valid reason :o

I have never ever used Perl so I dont have any idea about Perl ...

However I have used PHP and learnt much of this ..
The good thing about PHP is that a hell lot of Free PHP Scripts are available at different website.
Due to the diversity in availability of PHP Scripts, u often end up having exactly the same thing which u had wanted.

However, Perl Scripts are also available at most places but relatively they are much much lesser than the PHP Scripts :P

Furthermore, as people have said that PHP is a pure Web Language and indeed a very powerful language :o

So I will prefer PHP ;)


**** All Appreciations and Criticisms are welcome ****

Regards :
Samya Khalid

kook

Posted 02 January 2006 - 12:51 PM

PHP(*.php,*.php3) is Scripting(application)Language that easy to use and learn.It's open source. User can develop to use it.but it need to compile on server.
ASP(*.asp,*.aspx) is Scripting(application)Language.iT'S DON'T open source.You need to pay license to use.

hatim

Posted 23 November 2005 - 01:25 AM

Well php has evolved very quickly in last few years. If you search for open source solutions alot of them have been done in PHP.

but there are other options. Things like Ruby on Rails , Python and Plain old CGI (using C++)

ASP.net and JSP are also good options ...but only if you have a big architecture and can afford the Hardware to support it(they make devlopment easy ..if not offer the best possible solution.)

I think (and its strictly an opnion) PERL will die out sooner than PHP ...just cause of its hype...when does that happen ..i think within 5 years.

wat will happen to LAMP ...guess they would have to have a P retronym language...:)

ruben

Posted 22 November 2005 - 09:06 PM

I use PHP because I do not know Perl and I'm scared of the cgi-bin folder ^^ I haven't reached the borders of PHP yet, so I don't see a reason to learn Perl. I think PHP is a very easy to understand language and the best thing is that you can learn while you write. I just write and when I come across a function I need I look it up on php.net (usually they have the name I imagine) and then I can use it. If there is a usage problem I will usually find it in the comments (and additionally some handy scripts that are ready-to-use.)
I think PHP is the way of the most, because it is just damn popular, you rather get PHP than Perl on a freehost and it's easier to learn.

vujsa

Posted 10 September 2005 - 04:34 AM

I started using PHP when I noticed a book at the bookstore about it. It talked about Apache , MySQL, and PHP installation and very basic use. I started to learn right away. I was surprised how quickly I was picking everything up. Of course I had some limited programming encounters prior to the discovery of the book, but the book has set me on a new course.

In 1985, I got my first computer. It was ready to go for programming in BASIC. I printed "hello world!" a million times on my screen and even got to where I could program music into the computer.

In 1992, I took my first formal programing class. Turbo C! I didn't do as well in the class as I had hoped but I started to pick up the basics of all modern programming.

In 1995, I printed the source and output of the Indiana University Home Page. I went line by line until I understood every bit of HTML for that page. Shortly there after, I learned a little bit of JavaScript and made some engine displacement calculators and what not. Pretty simple scripts I must admit.

In 1999, I Downloaded and installed my first CGI script called Links (Gossamer Threads). As soon as I got the link indexer / search engine up and running, I started to notice that there were modifications that I wanted to add. The script was programmed entirely in Perl and the mods were manual find and replace or find and add. Having the mods as a roadmap as I started to moddify the script, I began learning a lot about Perl. I think that I could never write a full script in Perl with my current knowledge but what I learned helped me better understand PHP.

In 2003, I bought the PHP book that I have mention and started learning PHP. I have by no means mastered PHP but, I'm getting to where I can usually do what I want with it. The similarities between Perl and PHP are remarkable but that is also true about C. I have found PHP to be much easier to learn than Perl but I have very little interest in programming outside of the web now.

I was told by a friend of mine that is a very well paid free lance programmer that the language really doesn't matter. He's older now so his primary laguages are also older. He said that he tends to use fortran most often. He suggested that if the programmer knows the language well and is a good programmer, then he/she can program anything to do anything with any language. While many languages were design based on certain needs of the creators, the general abilities of all laguages are more or less the same. If a language doesn't contain the out of the box functionality that you require, then you'll simply have to write a more complex program.

My point is that there is no reason to think that any language will fall to extinction. There will always be a new flavor that is most popular but if a language as old as fortran is still being widely used, then it stands to reason that PHP and Perl will also survive.

For my money, I'll stick to PHP for the foreseeable future. Its easy to learn, easy to use, and currently has a lot of applications built on it.

vujsa

Review the complete topic (launches new window)