Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Perl vs PHP
Why would one prefer PHP over PERL, or vice, versa?  I'm guessing PERL has m
ore functionaltiy and is more robust.  What are the technical arguments for 
one over the other?
JP

Report this thread to moderator Post Follow-up to this message
Old Post
peery@comcast.net
04-22-04 03:31 PM


Re: Perl vs PHP
peery@comcast.net wrote:
> Why would one prefer PHP over PERL, or vice, versa?  I'm guessing PERL has
 more functionaltiy and is more robust.  What are the technical arguments fo
r one over the other?
> JP
>

LOL  :)  And I wanted to avoid this same line as fas as Expect was
concerned.

"PHP is a Server-side HTML-embedded cross-platform scripting langauge"
(that was a quote from Ramus Lerdorf, PHP creator; IIRMYQC.)

I Use both PHP and Perl (I use expect too but that is way OT here.)

Once upon a time there were things that PHP could do that were cludgey
in Perl - this is no longer the case.

However on the reverse, there are MANY things that Perl can do that PHP
cannot easily do.

Perl IMHO is a SysAdmin language and PHP is and more or less always will
be a WEB lanaguage.


PHP supports clearer variable level/depth abstraction (called dynamica
variables), Perl supports more obtuse coding styles.

PHP vars could look like:

$var = "Hello";
$$var = "World";

In reality this has become $hello = "world";

echo "$var ${$var}";


You'll have to read PHP coding books too see why this is the case...

In Perl, we have DualVars:

use strict;
use warnings;
use Scalar::Util "dualvar";

my $ans = dualvar 42, 'The Answer to Life, the Universe, and Everything';
printf("\nas number = '%d', as string = '%s'\n", $ans, $ans);

my $que = dualvar 54, 'What do you get when you multiply 6 by 9';
printf("\nas number = '%d', as string = '%s'\n", $que, $que);

But like I said in the past, each language has its own strengths.

LOL  =)
--
_Sx_ http://youve-reached-the.endoftheinternet.org/ _____
http://jaxpm.insecurity.org/
http://cis4dl.insecurity.org/

Report this thread to moderator Post Follow-up to this message
Old Post
Wc -Sx- Jones
04-22-04 03:31 PM


Re: Perl vs PHP
Why would one prefer Pepsi over Coke, or vice versa? :) That's the
answer to your question.

peery@comcast.net wrote:
> Why would one prefer PHP over PERL, or vice, versa?  I'm guessing PERL has
 more functionaltiy and is more robust.  What are the technical arguments fo
r one over the other?
> JP


Report this thread to moderator Post Follow-up to this message
Old Post
Ron B
04-22-04 03:31 PM


Re: Perl vs PHP
Ron B wrote on 22.04.2004:

>Why would one prefer Pepsi over Coke, or vice versa? :) That's the
>answer to your question.
>
>peery@comcast.net wrote: 
>

This implies that programming/scripting languages differ not more than soft=
drinks. Interesting. So by knowing (a little) Perl, I can program also Fort=
ran and Cobol! I never knew that. Thanks Ron! ;)

Jan
--=20
The day Microsoft makes something that doesn't suck is the day they start s=
elling vacuum cleaners.

Report this thread to moderator Post Follow-up to this message
Old Post
Jan Eden
04-22-04 04:32 PM


Re: Perl vs PHP
hehehe... You might be surprised.

While IANACY (I an not a coder... yet!), I have dabbled with other
languages.  The last 6+ months I've been studying Perl programming
intending to push into coding.  I've seen code in other languages (C for
example) and much of it looks very similar to Perl.  If I didn't look
closer I would have mistakenly said it was Perl code ::grinz::

Even though languages are very different in what they can do, they have
many similarities.



Jan Eden wrote:

>Ron B wrote on 22.04.2004:
>
>
> 
>
>This implies that programming/scripting languages differ not more than soft
drinks. Interesting. So by knowing (a little) Perl, I can program also Fortr
an and Cobol! I never knew that. Thanks Ron! ;)
>
>Jan
>
>


Report this thread to moderator Post Follow-up to this message
Old Post
U235sentinel
04-22-04 04:32 PM


Re: Perl vs PHP
Jan Eden wrote:
> This implies that programming/scripting languages differ not more than softdrinks.
 Interesting. So by knowing (a little) Perl, I can program also Fortran and Cobol! I
 never knew that. Thanks Ron! ;)


I can say from personal expereince that if you can program in
Perl you can *definitely* program in COBOL  ;)

they are no more different than a keg of flat versus
a can of mountain dew.

quantity over quality
--
_Sx_ http://youve-reached-the.endoftheinternet.org/ _____
http://jaxpm.insecurity.org/
http://cis4dl.insecurity.org/

Report this thread to moderator Post Follow-up to this message
Old Post
Wc -Sx- Jones
04-22-04 04:32 PM


Re: Perl vs PHP
> peery@comcast.net wrote: 
PERL has more functionaltiy and is more robust.  What are the technical
arguments for one over the other? 
>

>
> Perl IMHO is a SysAdmin language and PHP is and more or less always will
> be a WEB lanaguage.
>

PLEASE, do not pigeon hole Perl like that, you should know better!

Calling Perl a systems language maybe, but not a SysAdmin language, Perl
programmers everywhere are "rolling over in their graves and they aren't
even dead yet" (Andrew Dice Clay, yeh I know, so shoot me, I watch a lot
of movies)....

Helping sys admins with their mundane tasks more robustly than plain
shell, Perl does very well, but its abilities certainly go well beyond
these types of tasks.

http://danconia.org

Report this thread to moderator Post Follow-up to this message
Old Post
Wiggins D Anconia
04-22-04 05:33 PM


Re: Perl vs PHP

peery@comcast.net wrote:

> That's what I was looking for, thanks!
> Jason
>

No problem! Lots of good info out there :)
 
>
> 
>
>
>
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Jupiterhost.Net
04-22-04 05:33 PM


Re: Perl vs PHP

peery@comcast.net wrote:

> Why would one prefer PHP over PERL, or vice, versa?

Both are powerful, Perl is more mature is much more flexible.
PHP is a bloated resource hog also (Any program can be if badly written)
but PHP increases dramatically Apache's footprint and memory usage to
get its "features".

> I'm guessing PERL has more functionaltiy and is more robust.

Yes

> What are the technical arguments for one over the other?

As a server admin and support manager, 95% of our "script" related
problems are with PHP and "Perl" issues are  usually just a permission
issue...

PHP is run as a compiled apache module which makes it a trifle faster to
run natively, but I don't feel that it is a big advantage. If I really
need the extra 10ms I'll use mod_perl or PersistentPerl to accomplish
the same thing, only cheaper, faster, and with Perl :)

> JP

I'm sure others will have some info also, but generally I only use PHP
if there is a premade system, like phpBB, that does what I need and is
provided with the host (IE think cPanel) (and only after ruling out an
existing Perl version ;p). Anything I am responsible for making sure is
working well and doing its job I create in Perl...

Just my .02

Lee.M - JupiterHost.Net

Report this thread to moderator Post Follow-up to this message
Old Post
Jupiterhost.Net
04-22-04 05:33 PM


Re: Perl vs PHP

Wiggins d Anconia wrote:
 
>
> PERL has more functionaltiy and is more robust.  What are the technical
> arguments for one over the other?
> 
> 
>
>
> PLEASE, do not pigeon hole Perl like that, you should know better!
>
> Calling Perl a systems language maybe, but not a SysAdmin language, Perl
> programmers everywhere are "rolling over in their graves and they aren't
> even dead yet" (Andrew Dice Clay, yeh I know, so shoot me, I watch a lot
> of movies)....
>
> Helping sys admins with their mundane tasks more robustly than plain
> shell, Perl does very well, but its abilities certainly go well beyond
> these types of tasks.

I'll second that emotion :)

>
> http://danconia.org
>

Report this thread to moderator Post Follow-up to this message
Old Post
Jupiterhost.Net
04-22-04 05:33 PM


Sponsored Links




Last Thread Next Thread Next
Pages (2): [1] 2 »
Search this forum -> 
Post New Thread

PERL Beginners archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:06 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.