Hi,
I bet you heard this a lotta times, but how do you think Perl and PHP stand up against each other? I know Perl but I wanna learn PHP (since everyone's talking about it!). So which one is better?
Printable View
Hi,
I bet you heard this a lotta times, but how do you think Perl and PHP stand up against each other? I know Perl but I wanna learn PHP (since everyone's talking about it!). So which one is better?
Perl is better for conversions and net spiders. Also it's got a boatload of free customized software (in the form of .pm's)allowing you to interface with all kinds of goodies.
PHP is more suited to building web pages because you can easily switch between PHP and HTML right in the code. This can be done in Perl, but it's not as elegant. Also PHP has a built in feature of session variables that help you maintain a persistent connection to your web surfers when the browse from one page to the next. With Perl, you have to manually maintain the connection with cookies or maintain the session in a file or database.
Professionally speaking, Perl, PHP and ASP all share this drawback: if you sell your code, your buyers automatically have access to your source code. Java Servlets and C, on the other hand, are compiled which means you, the author, have more control over what can be done with your software.
cudabean
With my hosting package comes an admin control panel-esque thing, which is a .cgi file, but it's encrypted!Quote:
Originally posted by Cudabean
Professionally speaking, Perl, PHP and ASP all share this drawback: if you sell your code, your buyers automatically have access to your source code. Java Servlets and C, on the other hand, are compiled which means you, the author, have more control over what can be done with your software.
It seems to get passed to a decrypter, then to Perl, but i've no idea how to use the Filter module. If anybody knows I'd be very greatful. This is a little bit of itQuote:
#!/usr/bin/perl
use Filter::decrypt2 ;
ΓΏ a8HS<
"1a|Ss8HS
5S5!AT2^
Y?#8("E laPL*?S/S[X H
CY%%a|HaPL7 {DG'@OKA`OS3+CAX6FL <$"MW0]S3ybGUWU'VK 9S1/G@F-@S5ybGY\G'VK
?
a>F\E'QO
p5+^P,SsLp3S""]V_6
O=$"G^b@ O3a;F_0W
Y ?S'+UGD0WKZy4=Qr{QI/ OxW :U_B])r\HHmGY+AKY )U.<GT1FY $=>FB'8 jO )/FVUy;bzO
Perl seems to be slowly dying off, and being replaced with PHP. But I think PHP and ASP, will remain togethor for a long time, like VB and C++
yeah i think you could be right, it seems to me that it's just so much easier to do something in PHP than the equivelent in perlQuote:
Originally posted by Gimlin
Perl seems to be slowly dying off, and being replaced with PHP. But I think PHP and ASP, will remain togethor for a long time, like VB and C++
Perl's not dying - remember there are a million other uses for Perl besides web development. And if you use it for other things anyway, you tend to prefer it over PHP for your development (just like VB programmers would pick VBScript as their ASP language). And you can use Perl for ASP.
Then again, there's a newer, OO language called Ruby that's said to be a better Perl than Perl...
I thought since this is a web forum that saying "... in the context of web development" was superfluous.
I'm a solid VB man but because I knew Perl I went for PHP instead of ASP as Perl and PHP are pretty similar, which is certainly a good thing.
This Ruby sounds interesting, is that likely to be big for web dev?
And ASP is only better then PHP when using a huge DB
Well, XML or Perl aren't limited too web development, and I'd consider any question with them on topic.Quote:
I thought since this is a web forum that saying "... in the context of web development" was superfluous.
I don't know. I'm expecting it to put some serious heat on Perl and Python for *nix scripting language of choice in a couple years. If someone makes Apache mod_ruby I'm sure it'll be.Quote:
This Ruby sounds interesting, is that likely to be big for web dev?
how is that when MySql can hold 300% more in it's tables than Access.Quote:
Originally posted by Gimlin
And ASP is only better then PHP when using a huge DB
Quote:
The biggest advantage of PHP over Perl is that PHP was designed for scripting for the web where Perl was designed to do a lot more and can because of this get very complicated. The flexibility / complexity of Perl makes it easier to write code that another author / coder has a hard time reading. PHP has a less confusing and stricter format without losing flexibility. PHP is easier to integrate into existing HTML than Perl. PHP has pretty much all the 'good' functionality of Perl: constructs, syntax and so on, without making it as complicated as Perl can be. Perl is a very tried and true language, it's been around since the late eighties, but PHP is maturing very quickly.
Yeah, but can MySQL support transactions like Access yet?That's a feature! :DQuote:
The flexibility / complexity of Perl makes it easier to write code that another author / coder has a hard time reading
well it is if you intend to sell scipts...
In the end the correct answer is to not ask the question, rather learn both because they are both useful for what they do.
Also, make sure you have C syntax down because it is the basis of so many languages (C++, Java, perl, C#, awk, etc.).
cudabean
I best be likin' the perl more because it's more availibility optional in the filestream.
PHP is faster then perl but php wasn't never really meant to be a langauge.. Its still evolving but will probably put perl to its death sooner or later.
Yea but you have to compile the **** on their machine if you cross platforms with it or so I've heard. So either way you end up having to fork over code.. If you could simply compile the **** and sell it compiled then I'd make a zillion c++ scripts.Quote:
Java Servlets and C, on the other hand, are compiled which means you, the author, have more control over what can be done with your software.
But there is massive amounts of CGI-ish code written in Perl, so I'd expect it to be around for a long time.Quote:
PHP is faster then perl but php wasn't never really meant to be a langauge.. Its still evolving but will probably put perl to its death sooner or later.
If that's the case, why aren't you writing zillions of Java apps?Quote:
Originally posted by TheGuru
Yea but you have to compile the **** on their machine if you cross platforms with it or so I've heard. So either way you end up having to fork over code.. If you could simply compile the **** and sell it compiled then I'd make a zillion c++ scripts. [/B]
cudabean
JoshT - Yea perl still has demand but thats cause there is some things you cannot do in php "yet". I think if ya give php some times and let it evolve some more, it'll beat perl. For one reason is because it doesn't have the CGI overhead and its a lot simplier to use in a lot of ways.
Cudabean - only thing ya ever see java with is when someone is trying to change a homepage, add bookmarks, etc lol. Most online look at java like javascript but with a little umph to it.
This is dependent on web server configuration -- the stable IIS version of PHP is CGI and PHP can be run under Apache as CGI. However, for Apache, you can use mod_perl to run Perl without the CGI overhead, just like PHP runs with mod_php.Quote:
because it doesn't have the CGI overhead