Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messagepeery@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/
Post Follow-up to this messageWhy 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
Post Follow-up to this messageRon 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.
Post Follow-up to this messagehehehe... 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 > >
Post Follow-up to this messageJan 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/
Post Follow-up to this message> 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
Post Follow-up to this messagepeery@comcast.net wrote: > That's what I was looking for, thanks! > Jason > No problem! Lots of good info out there :) > > > > > > >
Post Follow-up to this messagepeery@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
Post Follow-up to this messageWiggins 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 >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.