Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 15 of 15
  1. #1
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts

    Exclamation Perl or PHP; What script language,

    I expect that this question has been asked before, but it has become increasingly obvious to me that at my advanced age, I can't realistically learn both.

    Which would be the easiest to learn. Not necessarily the most powerful.
    Just the easiest to remember and use.

    Your views would be helpful.

    Frank - alias effpeetee
    Last edited by effpeetee; 07-12-2007 at 08:35 PM.
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    My vote is PHP, based soley on my own experience. I set out to learn Perl, long long ago, and it never grabbed me. As soon as I wrote my first "Hello World" PHP script, I was hooked.

  • #3
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Quote Originally Posted by Fumigator View Post
    My vote is PHP, based soley on my own experience. I set out to learn Perl, long long ago, and it never grabbed me. As soon as I wrote my first "Hello World" PHP script, I was hooked.
    Thank you for your advice. My initial reaction is biased to php, but it will be interesting and helpful to find out others experiences.

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    PERL is somewhat lower level than PHP and so you need a greater understanding of how the web actually works in order to write efficient PERL code. PHP is easier to get working because you can combine it more easily with HTML.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #5
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Quote Originally Posted by felgall View Post
    PERL is somewhat lower level than PHP and so you need a greater understanding of how the web actually works in order to write efficient PERL code. PHP is easier to get working because you can combine it more easily with HTML.
    What I am after also is a language that has some code that in itself helps to remember it's function.
    Thus "save" in order to save. etc.
    I find it difficult when I have learn that e.g. //? represents say "goto"

    Although, I realise that there is more to it than that.

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #6
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Since I posted this question, I have been Googling around the internet. There seems no doubt that the best/easiest scripting language for me is PHP.

    That is what I intend to go ahead with.

    Thanks for your comments.

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #7
    Regular Coder ralph l mayo's Avatar
    Join Date
    Nov 2005
    Posts
    951
    Thanks
    1
    Thanked 31 Times in 29 Posts
    Consider Ruby. It's practically a superset of Perl, plus it actually makes sense:

    Code:
    # Cheer
    3.times { puts "Hooray!" }
    
    # Play rock-paper-scissors
    puts [ 'rock', 'paper', 'scissors' ].sort_by { rand }.first
    
    # Split the first 100 positive integers into two groups of even and odd
    evens, odds = (0..100).partition { |num| num % 2 == 0 }
    
    # Don't let Rob in your web app b/c he is a jerk
    exit if username.include?('Rob')
    
    # Get and display the current top headlines via RSS
    require 'rss'
    news = RSS::Parser.parse(open('http://news.google.com/?output=rss').read)
    news.items.each { |item| puts item.title }
    
    # Imbue all integers with the ability to find their factorial
    class Integer
    	def factorial
    		fact = 1
    		2.upto(self.abs) { |n| fact *= n }
    		return self < 0 ? -fact : fact
    	end
    end
    # This will output 120
    puts 5.factorial
    Last edited by ralph l mayo; 07-12-2007 at 10:41 AM.

  • #8
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Well!

    QUOTE:
    Consider Ruby. It's practically a superset of Perl, plus it actually makes sense:


    You really have put the cat among the pigeons.

    Python, Perl, PHP, Ruby.

    Any others out there?

    A very thoughful,

    Frank.
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #9
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,073
    Thanks
    11
    Thanked 98 Times in 96 Posts
    PHP was created to solve the `web problem` , its continued success suggests that it has.

    PHP was originally written because PERL, whilst more than capable, made for lots of ugly and/or obfuscated code to do some simple everyday web-related routines.

    Ruby & Python (google uses Python a LOT) have merit but neither I think are as user friendly as PHP (again this was its sole original purpose)

    Other (proprietary) solutions would be JAVA, ColdFusion or ASP/.NET

    If you add up usability, ease of use (without losing any `power`) support both commercial and community (and by support I also include ease/cost of hosting), its open source nature, plus the fact that finally people accept that it also scales very well thankyou very much .. I find it hard to pass up PHP in most web related projects.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #10
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    It also has the added attraction that I have a book "Learning PHP and MySQL"
    Also, I have a son in Casula in dear old Oz. (Not a logical argument.) But what the hell!

    PHP has a Pretty High Priority to date.

    Frank.
    Last edited by effpeetee; 07-12-2007 at 12:41 PM.
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #11
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,502
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    Frank ...

    Glad you're still going into PHP mode ...

    You'll discover that when you have various PHP scripts that do
    different things like, read a file, write to a file, sessions, etc. you
    will find yourself copying and pasting from one snippet of code
    to another. So remembering codes and having to type everything
    over again will not really be a problem.

    You might also need a quick "lookup" on a PHP function ... that's where
    you use Google. The word "PHP" first, then the function.

    Example: PHP date

    will bring up hits about the date function

    If you want to get into reading the contents of a directory,
    you might try a Google search like this:
    http://www.google.com/search?hl=en&q...=Google+Search

    ================

    So, always keep another browser window open for your Google searches.

    And, when you're stuck on something, ask in this forum.
    (don't forget you can also email me)

  • #12
    Regular Coder Iszak's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Western Australia
    Posts
    332
    Thanks
    2
    Thanked 58 Times in 57 Posts
    I recommend PHP and not Ruby or Ruby on Rails, there is my vote. PHP is easy to start off with, Perl is powerful though, but the learning curve is eh, same with Ruby. As for python the tabs kill me, but it's all to do with personal preference in the end. If you want a easy learning curve, popular choose PHP. It you want power, but it takes some power to learn I'd suggest Perl, Python. If you want speed you'll want Ruby. But yeah personal preference.

  • #13
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Hi! everyone.

    Many thanks for your interesting and helpful advice.

    I have however, after reading and considering, decided to go with PHP.
    As I said earlier, I have the book and helpful advice from Max who uses this script.

    I shall of course, ask for advice when I need it. (and that will be quite often)

    Frank.
    Last edited by effpeetee; 07-12-2007 at 05:30 PM.
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #14
    Regular Coder ralph l mayo's Avatar
    Join Date
    Nov 2005
    Posts
    951
    Thanks
    1
    Thanked 31 Times in 29 Posts
    Quote Originally Posted by Iszak View Post
    It you want power, but it takes some power to learn I'd suggest Perl, Python. If you want speed you'll want Ruby.
    No bearing on the original topic, and I may just be calling out a typo, but for the record the current Python implementation is much faster than the implementations of Ruby, Perl, or PHP because it uses Java-esque bytecode partial-compilation.

  • #15
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    ralph l mayo

    Thanks for your input and advice. I will certainly look at Python. At 82 yrs old, my main concern is that it is easy to remember.

    Is 'Python' at the server, or would I need to upload it.

    Thanks also for the URL's

    Frank
    Last edited by effpeetee; 07-13-2007 at 12:09 PM. Reason: Need extra info
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.


  •  

    Posting Permissions

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