470,602 Members | 1,633 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,602 developers. It's quick & easy.

perl and php

Bob
why is perl referred to as a CGI script and not php,

php has the facility to execute backticked execute commands that enable the
programmer to use operating system facilities as well ?

why would you bother with perl when you can use PHP which is far easier than
that other bloody language.
Jul 17 '05 #1
10 1729
Bob wrote:

Hee Bob
why is perl referred to as a CGI script and not php,
Don't know.
Is that the case?

php has the facility to execute backticked execute commands that enable
the programmer to use operating system facilities as well ?
yes it has.

why would you bother with perl when you can use PHP which is far easier
than that other bloody language.


You don't.
I started out with Perl and wasn't very charmed by it.
Why not?
Because Perl uses a lot of syntax and logic unknown to me (at that time)
based on Shellscripting (like BASH and the like).

Perl is a very fast and very potent language, but if you are just learning
webdevelopment, and don't have a SHELL-background I would surely recommend
PHP these days.
Simply bacause Perl is harder to learn than PHP for most folks.

So stick with PHP. :P

Regards,
Erwin Moller

PS: What response did you expect posting to a PHP-ng?
Jul 17 '05 #2
In article <BF********************@nasal.pacific.net.au>, Bob wrote:
why is perl referred to as a CGI script and not php,
Perl, PHP and many other languages can communicate with the webserver
through CGI (Common Gateway Interface).

But nowadays most webservers have modules for php and perl to reduce
serverload.
php has the facility to execute backticked execute commands that enable the
programmer to use operating system facilities as well ?
What makes you think Perl would not have these?
why would you bother with perl when you can use PHP which is far easier than
that other bloody language.


LOL, you must be a troll.
--
http://home.mysth.be/~timvw
Jul 17 '05 #3
In article <BF********************@nasal.pacific.net.au>, Bob wrote:
why is perl referred to as a CGI script and not php,
Well, I perfer perl for programming in, I actually think it's more fun
and overall easier. tis also 5 X easier to shoot yourself in the foot
with perl. (But then, in PHP, certain security mistakes seem easier to
make, such as when talking to databases)
php has the facility to execute backticked execute commands that enable the
programmer to use operating system facilities as well ?
I believe PHP was actually _written_ in perl at first.
why would you bother with perl when you can use PHP which is far easier than
that other bloody language.


I wouldn't say PHP is any easier, but PHP is generally faster on the web
side. (unless you're using mod_perl) Perl is generally best on the back
side, (cron processes, etc..) PHP is nice because it has all kinds of
features specifically for web programming. Wouldn't normally use if for
a shell script though, that'd be kind of silly.

For you, I'd definately stick with PHP, since you obviously perfer it.

You might use perl if mod_perl is available and you really need the
added performance or low-level control. (Persistant variables that span
across web requests, not sessions..) mod_perl.. now.. THAT is
hard. :-)

You might use perl if PHP isn't available.

For heavy serious web stuff, I'd recommend Servlets/JSP. (But only if
you can run 1+ web servers, since JSP is not a very standard ISP
package, it's good for applications that might span several machines.)

For things that really need performance, I'd go with C++ (or even
C/assembly) But not if time-to-market is a concern.

For things that are pretty much limited to commands, go with shell or
REXX.

All depends on the requirements and what you like to work in. Why would
an artist use those foul smelling oil paints when they could use
watercolor?

Jamie
--
http://www.geniegate.com Custom web programming
User Management Solutions Perl / PHP / Java / UNIX

Jul 17 '05 #4
"Bob" <wh*********************@hotmail.com> wrote in message
news:BF********************@nasal.pacific.net.au.. .
why is perl referred to as a CGI script and not php,
PHP scripts usually do not communicate with the web server via CGI--that's
one reason.
why would you bother with perl when you can use PHP which is far easier than that other bloody language.


Two words: regular expression.
Jul 17 '05 #5
On Fri, 14 May 2004 19:47:21 -0400, "Chung Leong" <ch***********@hotmail.com>
wrote:
"Bob" <wh*********************@hotmail.com> wrote in message
news:BF********************@nasal.pacific.net.au. ..
why is perl referred to as a CGI script and not php,


PHP scripts usually do not communicate with the web server via CGI--that's
one reason.
why would you bother with perl when you can use PHP which is far easier

than
that other bloody language.


Two words: regular expression.


Although you get some of the benefit of Perl's powerful brand of regular
expressions through the PCRE functions in PHP.

I'm trying not to get pulled into the original troll though; but I use Perl
and PHP split across what is probably the usual lines, PHP for web stuff, and
Perl for more complex batch/offline processes. mod_perl+HTML::Template looks
more than a match for PHP+Smarty if it weren't for the pain of setting up
mod_perl to get the performance.

--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool
http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
Jul 17 '05 #6
"Andy Hassall" <an**@andyh.co.uk> wrote in message
news:ag********************************@4ax.com...
Although you get some of the benefit of Perl's powerful brand of regular
expressions through the PCRE functions in PHP.


Perl's UTF8 support is far superior though.
Jul 17 '05 #7
On Sat, 15 May 2004 09:08:56 -0400, "Chung Leong" <ch***********@hotmail.com>
wrote:
"Andy Hassall" <an**@andyh.co.uk> wrote in message
news:ag********************************@4ax.com.. .
Although you get some of the benefit of Perl's powerful brand of regular
expressions through the PCRE functions in PHP.


Perl's UTF8 support is far superior though.


Indeed. Particularly with the improvements in 5.8.

--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool
http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
Jul 17 '05 #8
Bob

"Tim Van Wassenhove" <eu**@pi.be> wrote in message
news:2g************@uni-berlin.de...
In article <BF********************@nasal.pacific.net.au>, Bob wrote:
why is perl referred to as a CGI script and not php,
Perl, PHP and many other languages can communicate with the webserver
through CGI (Common Gateway Interface).

But nowadays most webservers have modules for php and perl to reduce
serverload.
php has the facility to execute backticked execute commands that enable the programmer to use operating system facilities as well ?


What makes you think Perl would not have these?

I know for a fact perl does, why one more than the other.
why would you bother with perl when you can use PHP which is far easier than that other bloody language.


LOL, you must be a troll.


no it was a serious question.

--
http://home.mysth.be/~timvw

Jul 17 '05 #9
Bob

"Average_Joe" <jo*@geniegate.com> wrote in message
news:sl****************@pong.tunestar.net...
In article <BF********************@nasal.pacific.net.au>, Bob wrote:
why is perl referred to as a CGI script and not php,
Well, I perfer perl for programming in, I actually think it's more fun
and overall easier. tis also 5 X easier to shoot yourself in the foot
with perl. (But then, in PHP, certain security mistakes seem easier to
make, such as when talking to databases)


Is there a taint checking facility in PHP as there is in perl ?
php has the facility to execute backticked execute commands that enable the programmer to use operating system facilities as well ?
I believe PHP was actually _written_ in perl at first.
why would you bother with perl when you can use PHP which is far easier than that other bloody language.


I wouldn't say PHP is any easier, but PHP is generally faster on the web
side. (unless you're using mod_perl) Perl is generally best on the back
side, (cron processes, etc..) PHP is nice because it has all kinds of
features specifically for web programming. Wouldn't normally use if for
a shell script though, that'd be kind of silly.

For you, I'd definately stick with PHP, since you obviously perfer it.


too right, I found Perl's syntax for pattern matching and regular
expressions a pain in the butt.
You might use perl if mod_perl is available and you really need the
added performance or low-level control. (Persistant variables that span
across web requests, not sessions..) mod_perl.. now.. THAT is
hard. :-)

You might use perl if PHP isn't available.

For heavy serious web stuff, I'd recommend Servlets/JSP. (But only if
you can run 1+ web servers, since JSP is not a very standard ISP
package, it's good for applications that might span several machines.) Is it similar to ASP as I've not heard of JSP.

For things that really need performance, I'd go with C++ (or even
C/assembly) But not if time-to-market is a concern.

For things that are pretty much limited to commands, go with shell or
REXX.
Rexx ? You mean IBM mainframe Rexx ??

All depends on the requirements and what you like to work in. Why would
an artist use those foul smelling oil paints when they could use
watercolor?
foul smelling ?
have you never smelt gum turpentiine ?

Jamie
--
http://www.geniegate.com Custom web programming
User Management Solutions Perl / PHP / Java / UNIX

Jul 17 '05 #10
Bob wrote:
why is perl referred to as a CGI script and not php,


Do you mean "preferred"? If so, I believe it's because PHP is used as a
server module/plug-in in almost all situations it's used. If not, PHP,
or any language (C, Java, bash, whatever), _can_ be used/

Jul 17 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Mark Wilson CPU | last post: by
31 posts views Thread by surfunbear | last post: by
reply views Thread by Kirt Loki Dankmyer | last post: by
13 posts views Thread by Otto J. Makela | last post: by
6 posts views Thread by surfivor | last post: by
4 posts views Thread by billb | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.