[EMAIL PROTECTED] 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 for 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/

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to