View Full Version : php vs perl
Grüssle
12-08-03, 08:16 AM
Why are you guys using perl and not php?
Is there a place where I can read about what the difference is?
I think you're comparing apples to oranges here. PHP is not a replacement for Perl.
~Charlie
Millennium
12-08-03, 11:40 PM
Why are you guys using perl and not php?
Is there a place where I can read about what the difference is?
PHP has its advanatages for web/CGI scripts, but there is nothing PHP does that Perl can not do, and there are many many more things Perl can do that PHP will most likely never do since its made for a specific platform/environment, server/browser, Perl is portable to many platforms and is a general use programming language, which PHP is not.
What PHP does is just a small part of the capabilities of the Perl language.
Skeleton Man
12-09-03, 05:02 AM
Why are you guys using perl and not php?
Is there a place where I can read about what the difference is?
I'll second Millennium, in saying that PHP is almost soley for web based applications, while Perl is very general purpose. PHP has everything at your fingertips for gathering input, working with databases, etc... but it lacks in areas such as regular expression support.. yes there are perl compataible regex functions, but it's just not the same..
PHP is excellent for quick and easy database work when your app is largely database driven.. everything you need is right at your fingertips, even user input is allready nicely assigned to variables... but what happens if I have thousands of lines of log files, and want to parse out key bits of information ? PHP can do this for me, but that's not what it was designed for, and certainly not what it does best...
Perl on the other hand is rather cumbersome when it comes to database work, and while it is still more than capable of handling it, the approach leaves somewhat to be desired, and is much more difficult for the begginner.. However, when it comes to parsing copius amounts of raw text, perl does this very effectively with it's top notch regex support... and that's only the tip of the iceberg
Both languages have their advantages, it comes down to using the right tool for the right job. Just because you could drive in a screw with a hammer, does that mean you should do it ?
Speaking from experience, I would highly reccomend becoming proficient in both Perl and PHP.. (perl will always remain my language of choice though)
Grüssle
12-09-03, 06:59 AM
Thank you guys, this has saved me a lot of research.
Skeleton Man
12-09-03, 07:42 AM
Thank you guys, this has saved me a lot of research.
Happy to help :)
vBulletin® v3.6.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.