|
-
Jan 7th, 2002, 11:21 PM
#1
Thread Starter
Member
Perl or PHP?
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?
-
Jan 8th, 2002, 12:37 AM
#2
Addicted Member
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
-
Jan 8th, 2002, 05:59 AM
#3
PowerPoster
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.
With my hosting package comes an admin control panel-esque thing, which is a .cgi file, but it's encrypted!
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 it
#!/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
Last edited by chrisjk; Jan 8th, 2002 at 06:03 AM.
-
Jan 9th, 2002, 10:59 PM
#4
Fanatic Member
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++
-
Jan 10th, 2002, 11:27 AM
#5
PowerPoster
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++
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 perl
-
Jan 10th, 2002, 11:47 AM
#6
Black Cat
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...
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Jan 10th, 2002, 11:56 AM
#7
PowerPoster
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?
-
Jan 10th, 2002, 12:15 PM
#8
Fanatic Member
And ASP is only better then PHP when using a huge DB
-
Jan 10th, 2002, 01:31 PM
#9
Black Cat
I thought since this is a web forum that saying "... in the context of web development" was superfluous.
Well, XML or Perl aren't limited too web development, and I'd consider any question with them on topic.
This Ruby sounds interesting, is that likely to be big for web dev?
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.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Jan 10th, 2002, 01:42 PM
#10
Originally posted by Gimlin
And ASP is only better then PHP when using a huge DB
how is that when MySql can hold 300% more in it's tables than Access.
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.
-
Jan 10th, 2002, 02:35 PM
#11
Black Cat
Yeah, but can MySQL support transactions like Access yet?
The flexibility / complexity of Perl makes it easier to write code that another author / coder has a hard time reading
That's a feature!
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Jan 10th, 2002, 02:50 PM
#12
PowerPoster
well it is if you intend to sell scipts...
-
Jan 10th, 2002, 05:50 PM
#13
Addicted Member
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
-
Jan 10th, 2002, 10:33 PM
#14
Stuck in the 80s
I best be likin' the perl more because it's more availibility optional in the filestream.
-
Jan 15th, 2002, 09:28 AM
#15
Member
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.
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.
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.
-
Jan 15th, 2002, 11:42 AM
#16
Black Cat
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.
But there is massive amounts of CGI-ish code written in Perl, so I'd expect it to be around for a long time.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Jan 15th, 2002, 12:07 PM
#17
Addicted Member
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]
If that's the case, why aren't you writing zillions of Java apps?
cudabean
-
Jan 16th, 2002, 12:19 AM
#18
Member
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.
-
Jan 16th, 2002, 09:21 AM
#19
Black Cat
because it doesn't have the CGI overhead
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.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|