473,508 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Php or Perl for CGI?

Hi. I'm trying to learn how to implement CGI on my site, and would like to
know what are the advantages of using Perl over PHP, if any. Thanks in
advance.

Ziggi
Jul 16 '05 #1
5 2359
On Sun, 14 Sep 2003 15:38:44 +0100, "Ziggi" <on*******@hotmail.com>
wrote:
Hi. I'm trying to learn how to implement CGI on my site,
Don't. CGI is pretty much obsolete and mod_perl or similar is a more
modern (and desptie that, a better) way of doing it.
and would like to
know what are the advantages of using Perl over PHP, if any.


Biggest advantage is for people who already know one or the other.

Perl is useful for non-web tasks too.

PHP is somewhat easier to learn.

Perl has much better access to obscure aspects of filesystems. This
can get serious if you're dealing with complex multi-user systems or
huge storage arrays.

Jul 16 '05 #2
Andy Dingley wrote:
Perl is useful for non-web tasks too.
So is PHP. I have written a whole host of command line tools, and
daemons with PHP. PHP may not be as obvious a choice but it stands up
VERY well.
PHP is somewhat easier to learn.
It is a much cleaner language IMHO.
Perl has much better access to obscure aspects of filesystems. This
can get serious if you're dealing with complex multi-user systems or
huge storage arrays.


I haven't found this, but that is probably my own bias.

--
/---+----+----+----+----+----+----++----+----+----+----+----+----+---\
I ph***********@libertydice.org II No nation was ever ruined by I
I http://www.libertydice.org II trade, even seemingly the most I
I remove "3d6" to e-mail II disadvantageous. - Ben Franklin I
\---+----+----+----+----+----+----++----+----+----+----+----+----+---/

Jul 16 '05 #3
Pham Nuwen <ph***********@libertydice.org> writes:
Andy Dingley wrote:
Perl is useful for non-web tasks too.


So is PHP. I have written a whole host of command line tools, and
daemons with PHP. PHP may not be as obvious a choice but it stands up
VERY well.


Indeed I've also used php for many more things than it was ever
intended for.
PHP is somewhat easier to learn.


It is a much cleaner language IMHO.


How are you defining "clean" here? PHP can be really ugly (and slow)
if you're not careful. By contrast Perl has at least had a stab at
modularity.

But this isn't a two horse race. Something like python is probably
cleaner than both and better suited to big tasks, whereas ruby can be
just as quick to learn and easy to write as php, and both have
associated apache modules.

The fact is that probably there is no wrong choice for the OP, he
should play with whatever takes his fancy.

--
Richard Watson
http://www.opencolo.com/
High Quality, Value for money colocation
Jul 16 '05 #4
"Ziggi" <on*******@hotmail.com> wrote in message
news:<bk**********@pegasus.csx.cam.ac.uk>...

I'm trying to learn how to implement CGI on my site, and would like
to know what are the advantages of using Perl over PHP, if any.


The only real advantage is your knowing Perl better than PHP. There
are very few things that can be done with Perl that can't be done
with PHP. Every once in a while, you come across a task for which
there is a readily available Perl script or module but no PHP. Perl
can be slightly faster (but not necessarily in your particular setup).
I have heard more than once that Perl has a steeper learning curve
than PHP (that is, learning Perl is more difficult, but after you
reach a certain level of proficiency, you become more productive).

In my opinion, these days, the choice of scripting language is largely
a matter of personal liking. Capabilities of various scripting
languages have converged quite a bit, and they will continue to do so.

Cheers,
NC
Jul 16 '05 #5
On Sun, 14 Sep 2003 19:53:36 +0100, "Richard Watson"
<ti********@doilywood.org.uk> wrote:
The fact is that probably there is no wrong choice for the OP, he
should play with whatever takes his fancy.


Certainly, and when she's bored of him, he can go back to programming
in any language he feels happy wtih.

Jim.
Jul 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
8120
by: Mark Wilson CPU | last post by:
This must be easy, but I'm missing something... I want to execute a Perl script, and capture ALL its output into a PHP variable. Here are my 2 files: -------------------------------------...
31
4724
by: surfunbear | last post by:
I've read some posts on Perl versus Python and studied a bit of my Python book. I'm a software engineer, familiar with C++ objected oriented development, but have been using Perl because it is...
0
9734
by: Kirt Loki Dankmyer | last post by:
So, I download the latest "stable" tar for perl (5.8.7) and try to compile it on the Solaris 8 (SPARC) box that I administrate. I try all sorts of different switches, but I can't get it to compile....
13
3227
by: Otto J. Makela | last post by:
I'm trying to install to php the Perl-1.0.0.tgz package (from http://pecl.php.net/package/perl, enabling one to call perl libraries) to a pre-existing Solaris system. Unfortunately, the attempt...
6
2983
by: surfivor | last post by:
I may be involved in a data migration project involving databases and creating XML feeds. Our site is PHP based, so I imagine the team might suggest PHP, but I had a look at the PHP documentation...
4
3671
by: billb | last post by:
I installed a perl extension for PHP to use some perl inside my php primarily because I have perl working with oracle and not php and oracle. So I want to use my old perl scripts, and use the...
21
34327
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
1
47353
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
0
7342
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7410
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7067
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5650
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3215
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3201
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
774
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.