SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 33

Thread: PHP or Perl???

  1. #1
    SitePoint Zealot MediaOhgr's Avatar
    Join Date
    Jul 2001
    Location
    Calgary, Alberta, Canada
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP or Perl???

    I'm curious. I've just recently decided to dive into a programming language but I'm not sure which I should invest my time into. I've been working on perl for the last few days and have managed:

    What is Your Name?
    What's the Secret Word?

    I don't know ... as I'm sure these lessons are important to learning perl, I'm an anxious bugger and want to get into the guts and learning the things that I will be using.

    Now for my other questions ... I've been seeing a lot of PHP around and am wondering if I'd better spend my time learing that? I really just want to learn something that will help produce more interactive pages, web stat pages and what have you. Does PHP work hand in hand with SSI like perl does? Does PHP noticably slow your page down? I've seen sites that use PHP extensively and find them slow.

    So many questions. Just keep in mind before you post a reply that I've got no idea what PHP is and have not done any sort of programming since the:

    10 print="MediaOhgr"
    20 goto 10 days!
    MediaOhgr - But then again, maybe it's just me ...

  2. #2
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There's no correct answer, sorry . It all depends on what you want to do.

    Generally speaking, if you want to interact with a database, you should use PHP (it's much easier). If you want to interact with the system, use Perl. But we could all help much more if we knew what you wanted to do.

  3. #3
    code addict Abstraction's Avatar
    Join Date
    Apr 2001
    Location
    Des Moines, IA
    Posts
    346
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Learn Perl, then PHP will be a snap.

  4. #4
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Personally, I would recommend going with PHP. It can do everything that Perl can do and more, plus you won't need any use of SSI's because PHP can do everything SSI's can do, and quicker, all the while utilitizing less server resources (generally). As for speed, PHP is blisteringly fast -- more so than CGI, Perl, SSI (for its uses) and even ASP (again, in general. It does depend on the server -- you can't expect a 600 Mhz server with 500 megs of RAM using PHP to outperform a 1 Ghz server with 1 gig of RAM using ASP). Since you're extremely new to PHP, here are some very good tutorials tailored to those who know only HTML.
    Geared toward PHP3, but great for getting your feet wet:
    http://www.devshed.com/Server_Side/PHP/Introduction/
    Then, start here and work your way through all five parts:
    http://www.devshed.com/Server_Side/PHP/PHP101_1/
    Having done that, you're set. Just get to work and you're off! Good luck!
    Last edited by Aes; Jul 19, 2001 at 10:54.
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  5. #5
    SitePoint Zealot MediaOhgr's Avatar
    Join Date
    Jul 2001
    Location
    Calgary, Alberta, Canada
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hmmm ...

    Abstraction:

    Yeah, I printed out a PHP Form Mail tutorial last night and PHP looks very similar to perl! Maybe that will be the route I take.

    qslack:

    See that's my problem. As I do not know what I can do with them, I'm not too sure what I want to do with them. I guess as it stands right now, I'm simply looking to make pages that are more interactive and dynamic.

    Things I can think of right now that I want to do:

    - I want to make a stats page for my own personal use with information such as: total visits, browser, resolution and urls of the visitors.
    - Email forms
    - 3 or 4 different page designs (site skins) that the user can set and change on the fly.
    - Secure folders and pages.

    Basically, I've been designing for the web for about 3 years now. I can make aesthetic, functional, usable web sites but have ZERO backend knowledge. So I'm looking into expanding my know-how to include a programming language. As I said above, I'm looking to make more interactive and dynamic web sites.

    Thanks for you input guys, I appreciate it very much.

    MediaOhgr
    MediaOhgr - But then again, maybe it's just me ...

  6. #6
    SitePoint Zealot MediaOhgr's Avatar
    Join Date
    Jul 2001
    Location
    Calgary, Alberta, Canada
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Heh heh heh ...

    Aes:

    Ya snuck that one in while I was typing my last response!

    Thanks a lot for your insight! I will definately be looking into those links you suggested.

    MediaOhgr
    MediaOhgr - But then again, maybe it's just me ...

  7. #7
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hmmm ...

    Originally posted by MediaOhgr
    See that's my problem. As I do not know what I can do with them, I'm not too sure what I want to do with them. I guess as it stands right now, I'm simply looking to make pages that are more interactive and dynamic.

    Things I can think of right now that I want to do:

    - I want to make a stats page for my own personal use with information such as: total visits, browser, resolution and urls of the visitors.
    - Email forms
    - 3 or 4 different page designs (site skins) that the user can set and change on the fly.
    - Secure folders and pages.
    In that case, I'd recommend Perl. You can embed it in HTML with a package like HTML::Mason (your host can set this up for you) and it will do everything you need.

    If you choose to go the PHP route, then what you want to do will be a bit harder. Perl excels at text manipulation and system administration tasks, which is basically what you need.

  8. #8
    SitePoint Zealot MediaOhgr's Avatar
    Join Date
    Jul 2001
    Location
    Calgary, Alberta, Canada
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Good Grief! :)

    LOL! These responses are coming mad!

    HELP! I've got myself in a SitePoint forum and I can't get out!

    Heh heh heh ... I love this place!!!

    Anyway ... I think I may qslack's and Abstractions combined advice and coninue on with perl. I've already got a good foot planted into perl so will forge on with that. Hopefully, once I've got a good solid handle on perl, I can advance into PHP and start learning other (IE: database (MySQL)) things. But that is a future endevour and not my number goal right now.

    Once again, thanks ever so much for all your help people. This is the greatest forum I've found yet!

    MediaOhgr

    P.S ~ I'm not closing the book on this conversation. If there are other people out there that would like to share thier thoughts, please do! This has already been and extreme help and I'll look forward to more insight!
    MediaOhgr - But then again, maybe it's just me ...

  9. #9
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No problem. Hope those links help.
    qslack: PHP is embedded with HTML -- and you don't need a package to do it.... =) And it's not hard at all!
    Last edited by Aes; Jul 19, 2001 at 11:13.
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  10. #10
    code addict Abstraction's Avatar
    Join Date
    Apr 2001
    Location
    Des Moines, IA
    Posts
    346
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Aes
    Personally, I would recommend going with PHP. It can do everything that Perl can do and more, plus you won't need any use of SSI's because PHP can do everything SSI's can do, and quicker, all the while utilitizing less server resources (generally).
    PHP can do more than Perl? You must be smoking some good stuff.

  11. #11
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Abstraction


    PHP can do more than Perl? You must be smoking some good stuff.
    Don't forget system()!

    PHP Code:
    <?php
    $PERLCODE 
    'print "...";';
    system("perl -e '$PERLCODE'");
    ?>

  12. #12
    code addict Abstraction's Avatar
    Join Date
    Apr 2001
    Location
    Des Moines, IA
    Posts
    346
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by qslack


    Don't forget system()!

    PHP Code:
    <?php
    $PERLCODE 
    'print "...";';
    system("perl -e '$PERLCODE'");
    ?>
    Perl can do the same.

  13. #13
    SitePoint Enthusiast
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    its my friend word :

    if you want to kill people use PERL
    if you just want to hurt people use PHP

    -
    not mean that i tell you to kill people ...

  14. #14
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    All right, all right. Stop your ranting and raving. All the halfway competent webmasters/developers here know that PHP owns.
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  15. #15
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Abstraction


    Perl can do the same.
    I was kidding!

    p.s. Is anyone else getting tired of these Perl vs. PHP threads? I know I am...

  16. #16
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    qslack: I agree with you on that one. Let's just say that both are very useful scripting languages and can work miracles with sites. The choice is up to the individual on which to use.
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  17. #17
    code addict Abstraction's Avatar
    Join Date
    Apr 2001
    Location
    Des Moines, IA
    Posts
    346
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by qslack


    I was kidding!

    p.s. Is anyone else getting tired of these Perl vs. PHP threads? I know I am...
    Can PHP do that? I guess I didn't even bother to see if it could or not.

    And yes I am getting tired of these discussions because any fully competent web developer knows that Perl is the only way to go. ;-)

  18. #18
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Those that are torn between using Perl and PHP should consider the new hybrid language Parrot: http://www.python.org/parrot.html which combines the best features of both languages.

    O'Rielly have an excellent beginners book "Programming Parrot in a Nutshell" http://www.oreilly.com/parrot/

    Enjoy!

  19. #19
    code addict Abstraction's Avatar
    Join Date
    Apr 2001
    Location
    Des Moines, IA
    Posts
    346
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by freakysid
    Those that are torn between using Perl and PHP should consider the new hybrid language Parrot: http://www.python.org/parrot.html which combines the best features of both languages.

    O'Rielly have an excellent beginners book "Programming Parrot in a Nutshell" http://www.oreilly.com/parrot/

    Enjoy!
    You mean a hybrid between Perl and Python. Not that it really matters. ;-)

  20. #20
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by freakysid
    Those that are torn between using Perl and PHP should consider the new hybrid language Parrot: http://www.python.org/parrot.html which combines the best features of both languages.
    ::hell freezes over::
    ::pigs fly::
    I'm positive I didn't hear that right. freakysid answering something incorrectly!?!?!? I never thought that I would see the day.
    Last edited by Aes; Jul 20, 2001 at 07:54.
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  21. #21
    chown linux:users\ /world Hartmann's Avatar
    Join Date
    Aug 2000
    Location
    Houston, TX, USA
    Posts
    6,455
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Good one freakysid!

  22. #22
    SitePoint Zealot MediaOhgr's Avatar
    Join Date
    Jul 2001
    Location
    Calgary, Alberta, Canada
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP it is!

    Heh heh heh ... this has been both helpful and entertaining!

    I've decided upon PHP by the way. Already I've noticed that it seems to be easier to learn than perl ... for me anyway.

    Has anyone heard of or used PHPTriad? Supposedly one can run php and mysql stuff locally on thier pc with this thing. Anyone know of a good manual for it though? I can find ZERO documentation on it so far.

    MediaOhgr
    MediaOhgr - But then again, maybe it's just me ...

  23. #23
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You don't need PHPTriad to run a local development enviroment, it will only help you get each component installed. However its quite easy to just download Apache, PHP and MySQL separatley then install them on your PC, or use IIS with PHP although I would suggest using Apache.

    I only dis IIS because I spent the better half of yesterday getting rid of the "Red Worm Virus" that our NT server picked up from not having IIS properly patched.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  24. #24
    SitePoint Addict manipura's Avatar
    Join Date
    Apr 2001
    Location
    Calgary,AB
    Posts
    345
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you want to learn PHP I suggest you read a post that Skunk made a while back. You Can Find It Here

  25. #25
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by freddydoesphp
    You don't need PHPTriad to run a local development enviroment, it will only help you get each component installed. However its quite easy to just download Apache, PHP and MySQL separatley then install them on your PC, or use IIS with PHP although I would suggest using Apache.
    yeah, i don't like those things that combine everything to "make it easier." get out there and install the 3 yourself! it's pretty easy and more fun.


Bookmarks

Posting Permissions

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