hosted by liquidweb


Go Back   Web Hosting Talk : Other Forums : Web Hosting Lounge : My Crusade For Perl
Reply

Forum Jump

My Crusade For Perl

Reply Post New Thread In Web Hosting Lounge Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 02-24-2002, 01:09 PM
Revelation Revelation is offline
Junior Guru Wannabe
 
Join Date: Dec 2001
Posts: 61

My Crusade For Perl


Perl is a programming language, which I find beautiful.

Perl > PHP

Somethings which make this true:

A more advanced database abstraction layer. Perl code does not rely on a database, rather it can run on many databases. PHP has gained something like this in its' PEAR abstraction layer, but it doesn't come close to good 'ol use DBI; in the functionality, and abilities.

Cpan. Perl has a ton of code prebuilt for its' users; this lets them spend time working on things that are unique and important instead of wasting their time on unimportant code that's been done time and time again (although I'm not a fan of the majority of modules due to overhead, there's no reason not to rip some of that code.)

The perl community. The community of perl coders is much more advanced than that of PHP coders. 'Nough said.

PHP mixes hashes with arrays. PerlDSC rocks my world, when it comes to needing more out of your programming language.



If you want to learn about perl irc to: irc.cyberarmy.com, #pr3l

(yes, we know the IRC domain is unleet, but the network admins don't bother me.)



Sponsored Links
  #2  
Old 02-24-2002, 04:22 PM
Revelation Revelation is offline
Junior Guru Wannabe
 
Join Date: Dec 2001
Posts: 61
Any responses/questions/IRC people who want to join the spammed channel?

  #3  
Old 02-24-2002, 10:12 PM
Tim Greer Tim Greer is offline
<insert something witty>
 
Join Date: Apr 2000
Location: California
Posts: 3,051
This has been brought up a few times everywhere. Very few people would dare say that PHP is better than Perl -- PHP is just made to be easier to accomplish a lot of web tasks (not that Perl isn't easy (but it's a lot more difficult than PHP and it's built-in functions for a lot of people) or can't accomplish the same tasks (because it can and then some)) for people that don't have the time or ability or desire to learn a more powerful language like Perl or C, etc. Perl is great, I've been using it since 1995. Install some OS like Slackware sometimes, in a mode to choose the components, or at least list them and show you what files are being installed, where it tells you about them briefly while it installs -- it will give a simple, short and accurate description of what PHP is and what it's meant for. I think that sums it up best.

Sponsored Links
  #4  
Old 02-24-2002, 10:36 PM
ffeingol ffeingol is offline
Community Guide
 
Join Date: Jun 2001
Location: Earth
Posts: 1,256
I like to think of it as the best tool for the job. I use perl for some things, PHP for others, sed, awk, ksh etc.

One is not "better" than the other (IMHO). Certain tools fit the job better than others.

Frank

__________________
Umbra Hosting
cPanel | Softaculous | CloudLinux | R1Soft | Ksplice
Web Hosting, Reseller Hosting, VPS, Dedicated Servers, Colocation
UmbraHosting.com

  #5  
Old 02-24-2002, 11:56 PM
Tim Greer Tim Greer is offline
<insert something witty>
 
Join Date: Apr 2000
Location: California
Posts: 3,051
Quote:
Originally posted by ffeingol
I like to think of it as the best tool for the job. I use perl for some things, PHP for others, sed, awk, ksh etc.

One is not "better" than the other (IMHO). Certain tools fit the job better than others.

Frank
Well, the point was, to me anyway, that Perl is just as good as PHP for any job that PHP can do. It's also more powerful and flexible. It's not what's best for the job, since Perl is better and can do anything that PHP can do, for any job. Therefore, it's better.

However, the fact is, Perl is more complex and takes longer to learn. PHP is simple and faster to learn. And, since PHP can accomplish a lot of tasks, even if it's not "better", it will work just fine and therefore a lot of people have no reason to learn Perl, since they don't need to or care to make use of the reasons why Perl is just as good for the same jobs, in addition to many more PHP can not accomplish or isn't as good for.

So, it's not what is better, since Perl offers the same things as PHP, including embedding it in HTML and making use of web server modules like mod_perl, FastCGI, etc., which also means it's not CGI and will be just as efficient, if not more efficient than PHP is as a web server module too. I'm not trying to push my opinion off as "the way it is" or start a language war, but I don't think it's correct to say that it's "one's better for one job and another is better for another". It's not true, since Perl can do everything PHP can, just as easily (if you take the time to learn it), and just as fast (not to mention the thousands of other advantages to using Perl. However, and again, PHP is a good language and for a lot of web interfaces you don't need any more and Perl isn't needed.

Therefore, for a lot of people, learning Perl when they know PHP would be ridiculous. However, at the same time, PHP still has a lot of issues from a programmer and administrative point of view that Perl doesn't have, and that also makes a difference to add to the fact that since Perl can jut as well do the same job as any PHP script can do, it will also have the advantages from a programmer and system administrator point of view. Though, as PHP develops more, and as Apache and other web servers develop more, PHP will not have these issues and even though Perl will likely be a better choice, PHP can be used without any issues now and in the future even more so. I hop that's more clear about my standing on it. After all, I like PHP, and hey, a lot of the syntax is like Perl. If I want more power or to do better regular expressions and have more control, I'll use Perl. :-)

  #6  
Old 02-25-2002, 08:04 PM
Revelation Revelation is offline
Junior Guru Wannabe
 
Join Date: Dec 2001
Posts: 61
A Couple Things To Consider

Should a programming language only be used for a web interface?

Ever tried to code a daemon (the least bit advanced) in PHP? I'll tell you right now that it's a lot easyer to do it in perl.

Perl has much better documentation, and although it may be a tad bit harder to learn (I emphasize tad) the ability of most perl coders is much higher than the ability of most PHP coders.

At this point with mod_perl, perl can be one of the most dynamic and *efficient* programming methods. This means faster load times for your websites, and the boss using a couple less dedicated servers.

I've only met one person who swears by PHP, and tries to make arguements for it. You could say that she is rather headstrong.

After you have learned basic perl, advanced perl is much nicer than advanced PHP, because of the documentation behind perl I've found examples of anything and everything in perl scripts, but to do the same thing in PHP it's going to be hard to find those advanced functions, unless you go to php.net, and read up.

Advice: If you want help from nice people Do not go into dalnet #perl, as the people there are anal and pretentious, instead idle in irc.cyberarmy.com #pr3l, and wait for one of the people who codes to get online.

  #7  
Old 02-25-2002, 10:21 PM
MDJ2000 MDJ2000 is offline
Web Hosting Master
 
Join Date: Dec 2001
Posts: 1,815
What exactly is your beef here? I don't think anyone denies PERL is a more powerful programming language. PHP is, after all, only a scripting language.

  #8  
Old 02-26-2002, 03:39 AM
kunal kunal is offline
Web Hosting Master
 
Join Date: Aug 2000
Posts: 2,750
right...

__________________
The Php Support Desk
http://www.phpsupportdesk.com
Custom programming - kunal @ e-phoria.com
http://www.pingzine.com - Ping!Zine. the FREE, FRESH and EXCITING Web Hosting Magazine...

  #9  
Old 02-26-2002, 10:36 AM
ffeingol ffeingol is offline
Community Guide
 
Join Date: Jun 2001
Location: Earth
Posts: 1,256
Yea, I really had to think about it before I replied to this post.

Perl vs. PHP vs. CF vs. Java vs. you name it is almost like discussing the best religion .

I still stand by my original thoughts. To me it really depends on what's available on the server that I'm working with. Not all servers have mod_per. Not all servers have mod_php.

Frank

__________________
Umbra Hosting
cPanel | Softaculous | CloudLinux | R1Soft | Ksplice
Web Hosting, Reseller Hosting, VPS, Dedicated Servers, Colocation
UmbraHosting.com

  #10  
Old 02-26-2002, 12:09 PM
priyadi priyadi is offline
Registered User
 
Join Date: Apr 2001
Location: Depok, Indonesia
Posts: 986
I learn PHP before Perl. Actually understanding PHP first made it easier for me to learn Perl since PHP is much easier to learn and the syntax for both languages are similar. Having learned both language inside out, I find Perl is more mature. Coding in PHP feels like Perl 4 if you ask me. The following are my biggest complaints with PHP:

- Namespace pollution, this was an issue with Perl 4 too back then. For example, assume when you code in PHP you use a function named pack(), then you upgrade to latest PHP to find your scripts don't work because the latest PHP have the function pack(), now you have to go through all the scripts to make it work with latest PHP. I thought the developers were going to take the advantage of PHP 4 rewrite to fix this, but they didn't .

- Configuration files (php.ini) make one installation of PHP different from another. A programmer must use code like "if (magic_quotes_is enabled) { do this } else { do that }" to make his/her scripts portable, beating the purpose of magic quotes in the first place.

- It is not trivial (and not well documented) to add a module into PHP without recompiling all over again. Most people do a configure ; make ; make install when they need to install a few module. It is also a lot more complicated if the user is not the server admnistrator. We keep seeing people asking if some module is installed before signing up to a web host. In Perl, installing new module is a 'perl -MCPAN -e "install module"' away.

- Security. By default PHP put every user inputted variables into the main namespace. This has created numerous security problem in some PHP application. This, I believe, is fixed in latest version of PHP.

  #11  
Old 02-26-2002, 12:14 PM
Ahmad Ahmad is offline
Web Hosting Master
 
Join Date: Jan 2002
Location: Kuwait
Posts: 679
EDIT:

Toss a coin, and choose.

__________________
Ahmad Alhashemi
PHP, Apache, C, Python, Perl, SQL
18 related BrainBench certificates


Last edited by Ahmad; 02-26-2002 at 12:57 PM.
  #12  
Old 02-26-2002, 12:29 PM
projo projo is offline
Aspiring Evangelist
 
Join Date: Dec 2000
Posts: 371
I used Perl for about a year and then php for about 10 months now. I don't know which is better. I don't know which is easier. I don't know which can do the most. I do know that I am more productive in PHP, by a large margin. It may be because I am bald. In any event since I like being more productive I prefer PHP.
Gary

__________________
Work: projo.ws
Home: yard piddling

  #13  
Old 02-26-2002, 12:41 PM
Tim Greer Tim Greer is offline
<insert something witty>
 
Join Date: Apr 2000
Location: California
Posts: 3,051
NONE of you know ANYTHING about what you're saying! Let's just all face the facts and admit that I, ONLY I, am right -- AND, if I created a language, if would be BETTER than C or assembly, but be even more popular and easy to use and learn than Perl or PHP OR Python! Now, I'm not asking anyone to worship me, worship God, but I would be willing to take donations. After all, language can be a religion, and I need funding to get this off the ground. I'll take cash, credit cards, money orders, foreign currency, precious metal and stones, computer systems, parts, even food stamps. Come on, it'll just save time from bitching and moaning about opinions, since I'm right and you're wrong anyway. Please PM me for my email to send funds (I'm expecting a lot of people volunteering, so don't disappoint me by being a bunch of cheap bastards!) -- END OF DISCUSSION!

  #14  
Old 02-26-2002, 12:51 PM
Ahmad Ahmad is offline
Web Hosting Master
 
Join Date: Jan 2002
Location: Kuwait
Posts: 679
EDIT:

Toss a coin, and choose.

__________________
Ahmad Alhashemi
PHP, Apache, C, Python, Perl, SQL
18 related BrainBench certificates

  #15  
Old 02-26-2002, 12:55 PM
Ahmad Ahmad is offline
Web Hosting Master
 
Join Date: Jan 2002
Location: Kuwait
Posts: 679
Quote:
Originally posted by Tim_Greer
NONE of you know ANYTHING about what you're saying! Let's just all face the facts and admit that I, ONLY I, am right -- AND, if I created a language, if would be BETTER than C or assembly, but be even more popular and easy to use and learn than Perl or PHP OR Python! Now, I'm not asking anyone to worship me, worship God, but I would be willing to take donations. After all, language can be a religion, and I need funding to get this off the ground. I'll take cash, credit cards, money orders, foreign currency, precious metal and stones, computer systems, parts, even food stamps. Come on, it'll just save time from bitching and moaning about opinions, since I'm right and you're wrong anyway. Please PM me for my email to send funds (I'm expecting a lot of people volunteering, so don't disappoint me by being a bunch of cheap bastards!) -- END OF DISCUSSION!
I'm so sorry that you feel that way. I will remove my post anyway.

__________________
Ahmad Alhashemi
PHP, Apache, C, Python, Perl, SQL
18 related BrainBench certificates

Reply

Related posts from TheWhir.com
Title Type Date Posted
Linux Malware Operation Windigo Infects 25,000 Web Servers Web Hosting News 2014-03-19 11:44:53
Admin-Ahead Server Technologies Listing 2013-11-08 07:23:41
AWS and DevOps Skills in High Demand, says Dice Web Hosting News 2013-09-11 13:42:13
cPanel & WHM Software 11.36 Reaches Stable Tier Status Web Hosting News 2013-04-09 11:44:33
cPanel Security Updates Address Perl Module Vulnerabilities Web Hosting News 2012-12-06 12:55:54


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:
WHT Membership
WHT Membership



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?