Author
Message
GegaBit
Posts:3311
Senior member
Member since: 2006-11-30
:: Quote ::
Subject: Shall I learn PHP or Perl?
As a webmaster I'm finding it very difficult to get things done without a programing language under my belt. Outsourcing is out of the question do to trust factors..

So what's the verdict, shall I go ahead and learn PHP or Perl?

To me PHP looks like gibberish while Perl is like reading English, I've also seen excellent Perl libraries stuff that would save one a lot of time.

I'm also hearing about PHP versions compatibility issues.

On the other hand PHP seems to be the language of choice for most webmasters out there, probably because it looks like C which I am totally ignorant in.

Applications that I want to build of integrate might involve mysql database access, htaccess file access, logs monitoring, alerts..

So what's the verdict, Perl or PHP?
March 27, 2008 07:21PM
Joshua
Posts:2831
Administrator
Member since: 2007-03-16
:: Quote ::
Subject: Re: Shall I learn PHP or Perl?
Quote:
Outsourcing is out of the question do to trust factors..
NDA Maybe?

Do you do any programming at all? I always think and say it really doesn't matter too much what language it is. Basic principles are always the same. Syntax may differ slightly. There is a huge different though on object oriented and the procedural approach.

Rewriting .htaccess files with code as part of user interaction doesn't sound like a smart thing to do.
March 28, 2008 09:55PM
GegaBit
Posts:3311
Senior member
Member since: 2006-11-30
:: Quote ::
Subject: Re: Shall I learn PHP or Perl?
>Do you do any programming at all?

I even have a university degree to prove it too :-) but that was 18 years ago. The last coding I've done was a quick hack in Apple script to verify and transfer files over an Appletalk network many years ago, procedural approach is fine, basic concepts is fine, OO is Chinese to me! In theory I can code, but we all know how theories crumble when reality hits.

The htaccess and log file monitoring is related to blocking IPs not user interaction.
March 28, 2008 11:07PM
Joshua
Posts:2831
Administrator
Member since: 2007-03-16
:: Quote ::
Subject: Re: Shall I learn PHP or Perl?
As I understood you want to unblock IPs based on users action (captcha, or whatever).
March 28, 2008 11:21PM
GegaBit
Posts:3311
Senior member
Member since: 2006-11-30
:: Quote ::
Subject: Re: Shall I learn PHP or Perl?
Oh, that's just one of many dreams..
March 28, 2008 11:27PM
nitewing
Posts:860
Senior Member
Member since: 2006-11-30
:: Quote ::
Subject: Re: Shall I learn PHP or Perl?
Before the illness set in with a bang I studied both. I found that PHP was by far the easiest to learn and use.

It does seem to have a problem as if it is not closed off correctly it will cause the browser using the script to lose memory...don't have that Nailed down yet.

My vote is for PHP...far less involved!



Ann



Edited 1 time(s). Last edit at 04/07/2008 08:39PM by nitewing.
April 07, 2008 08:38PM
nitewing
Posts:860
Senior Member
Member since: 2006-11-30
:: Quote ::
Subject: Re: Shall I learn PHP or Perl?
Also there are some very good scripting archives around for small scripts which I now use when I need one.


Ann
April 07, 2008 08:43PM
GegaBit
Posts:3311
Senior member
Member since: 2006-11-30
:: Quote ::
Subject: Re: Shall I learn PHP or Perl?
Ann never seizes to impress me
Ann a geek?
wow!
April 07, 2008 09:13PM
nitewing
Posts:860
Senior Member
Member since: 2006-11-30
:: Quote ::
Subject: Re: Shall I learn PHP or Perl?
Ahhh, still water runs the deepest.

winking smiley

Ann
April 07, 2008 10:33PM
Roger
Posts:46
Junior member
Member since: 2008-12-16
:: Quote ::
Subject: Re: Shall I learn PHP or Perl?
> To me PHP looks like gibberish while Perl is like
> reading English, I've also seen excellent Perl
> libraries stuff that would save one a lot of
> time.
>
> I'm also hearing about PHP versions compatibility
> issues.
>
> On the other hand PHP seems to be the language of
> choice for most webmasters out there, probably
> because it looks like C which I am totally
> ignorant in.

> So what's the verdict, Perl or PHP?

I use PHP for pretty much everything on my sites. I have very few static HTML pages. Most everything is dynamically generated using PHP and a mySQL database.

I'm surprised that you think Perl looks easier to understand to you. Both Perl and PHP are based on C. But, Perl adds a lot of powerful, but hard-to-learn, stuff like regular expressions.

PHP also supports the same stuff (including regular expressions), but it does it in a more straight-forward way that's more familiar to those of us that came from the Pascal / C / C++ world. Perl supports the "hard stuff" in the language construct itself. Under PHP you can use the hard stuff, but it's done through function calls.

I think it would be easier to learn PHP first then, if you have a need to do so, learn Perl. The languages aren't really that different, but PHP is a little more conventional.

'Course, no programmer ever actually creates anything new. We always start with existing code whether we start with an existing script or "copy and paste" something from the web. So, whatever language you choose to work with may depend on what code you want to ... err ... borrow.

As far as PHP version compatibility, that's not really a big issue. If you're writing something from scratch (hee, hee, see above) you'll write it for whichever version of PHP you have installed. If you're using an existing script, it'll probably have already been fixed to work on both PHP 4 and 5. If not, the fixes generally aren't major.

I know I'm responding to an old post, but I'm new! :-)

-- Roger



Edited 1 time(s). Last edit at 12/18/2008 05:37PM by Roger.
December 18, 2008 05:36PM
GegaBit
Posts:3311
Senior member
Member since: 2006-11-30
:: Quote ::
Subject: Re: Shall I learn PHP or Perl?
Thanks Roger, glad you ran into this thread.
Looking forward to your knowledgeable input when I dip very busy toe in murky waters.
If Ann (God rest her soul) can do it and recommended it, who am I to argue.
December 18, 2008 07:01PM
aa8vs
Posts:10
New member
Member since: 2010-07-12
:: Quote ::
Subject: Re: Shall I learn PHP or Perl?
I have a book on PHP and still working through installing it on my server. I have been using ASP scripts for several years now and based on some recent experience with setting up a mailer using ASP from the book I have the PHP seems like it would have been simpler to do with more features. Alas I am a simple man and found ASP works reasonably well. I have found this page very useful: [www.asp101.com]

But if I want to get fancy I will have to start looking into the PHP installation again.

Chuck
July 14, 2010 08:50PM

Sorry, you do not have permission to post/reply in this forum.