Results 1 to 24 of 24
  1. #1
    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.)

  2. #2
    Join Date
    Dec 2001
    Posts
    61
    Any responses/questions/IRC people who want to join the spammed channel?

  3. #3
    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.

  4. #4
    Join Date
    Jun 2001
    Location
    Earth
    Posts
    1,259
    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. #5
    Join Date
    Apr 2000
    Location
    California
    Posts
    3,051
    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. #6
    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. #7
    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. #8
    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. #9
    Join Date
    Jun 2001
    Location
    Earth
    Posts
    1,259
    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. #10
    Join Date
    Apr 2001
    Location
    Depok, Indonesia
    Posts
    988
    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. #11
    Join Date
    Jan 2002
    Location
    Kuwait
    Posts
    679
    EDIT:

    Toss a coin, and choose.
    Last edited by Ahmad; 02-26-2002 at 12:57 PM.
    Ahmad Alhashemi
    PHP, Apache, C, Python, Perl, SQL
    18 related BrainBench certificates

  12. #12
    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

  13. #13
    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. #14
    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. #15
    Join Date
    Jan 2002
    Location
    Kuwait
    Posts
    679
    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

  16. #16
    Join Date
    Apr 2001
    Location
    Depok, Indonesia
    Posts
    988
    Originally posted by Ahmad


    I'm so sorry that you feel that way. I will remove my post anyway.
    C'mon... you can't just remove your posts just like that, at least not the insightful ones.

  17. #17
    Originally posted by Tim_Greer
    I, ONLY I, am right
    Ah, so this is the reason why your post is so extreme short? At least for a (c) original Tim_Greer post?

  18. #18
    Join Date
    Jan 2002
    Location
    Kuwait
    Posts
    679
    I realized that my posts wouldn't matter no matter how insightful they are. They were doing nothing but making some people sad. I've been writing similar posts since I learned PHP about a year ago, I don't miss them anymore
    Ahmad Alhashemi
    PHP, Apache, C, Python, Perl, SQL
    18 related BrainBench certificates

  19. #19
    Join Date
    Apr 2000
    Location
    California
    Posts
    3,051
    Wow, you guys. I have a gift for you. It's often referred to as a "joke" and I'd like for you to have it really, please, take it. :-)

  20. #20
    Join Date
    Jan 2002
    Location
    Kuwait
    Posts
    679
    Originally posted by Tim_Greer
    Wow, you guys. I have a gift for you. It's often referred to as a "joke" and I'd like for you to have it really, please, take it. :-)
    I do.

    Err .. I mean I take it

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

  21. #21
    Join Date
    Dec 2001
    Posts
    61

    Aw hell....

    this crussade has sucked. I guess I'll have to try another one in a couple of days....

  22. #22
    Join Date
    Apr 2000
    Location
    California
    Posts
    3,051
    well, I know my sense of humor sucks, but if you could just hear my voice and not just read my words, you'd see! You'd see! :-)

  23. #23
    Join Date
    Dec 2001
    Posts
    61

    There's

    nobody to argue with on this topic. The only people who believe that PHP is better than perl are headstrong, and ign'ant

  24. #24
    Join Date
    Nov 2001
    Location
    Ann Arbor, MI
    Posts
    2,979
    I just have one thing to say, and I already said it:

    http://www.webhostingtalk.com/showth...threadid=35083
    -Mark Adams
    www.bitserve.com - Secure Michigan web hosting for your business.
    Only host still offering a full money back uptime guarantee and prorated refunds.
    Offering advanced server management and security incident response!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •