🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.perl.misc
2 messages
2 total messages Started by Jon Fri, 22 Sep 2000 00:00
- For this type of use (see msg), should I use Perl of PHP3?
#92
Author: Jon
Date: Fri, 22 Sep 2000 00:00
25 lines
1866 bytes
I am launching a new site and I have the option of having all my file
splicing and parsing (templates and whatnot) done either via Perl (.cgi) or
PHP (.phtml)  That will be 90% of the use of the script... assemble
templates + raw files, breaking files down into multiple "click here for
page 2/3/etc" pages... etc...

ASP is not an option, I'm on UNIX.

I keep hearing different stories about which of the two (Perl vs CGI)
performs better on large loads (you'd think I was talking about a laundry
detergent wouldn't you?)

All my links will be drawn up one way or another... so which way should I be
investing my time in (I'll be hiring someone to do the script)?

Perl or PHP3?

PS: The server admin told me he had to shut down several sites earlier this
year because of Perl scripts... too many hits, and every hit ran the
template-grabbing CGI.  He said sites that get less hits but use Perl tax
the server more than sites that get more hits but use PHP... somehow, PHP
opens and closes fewer files (that's how it was explained to me) so he's
strongly pushing for PHP.  Is this all just BS?

Jon
Re: - For this type of use (see msg), should I use Perl of PHP3?
#93
Author: Tim Hammerquist
Date: Sat, 23 Sep 2000 00:00
80 lines
4168 bytes
[Removed cz.comp.lang.php from NG list to protect us (ok, me) =)]

Jon <vemba72@hotmail.com> wrote:
> I am launching a new site and I have the option of having all my file
> splicing and parsing (templates and whatnot) done either via Perl (.cgi) or
> PHP (.phtml)  That will be 90% of the use of the script... assemble
> templates + raw files, breaking files down into multiple "click here for
> page 2/3/etc" pages... etc...

Splicing and parsing...sounds like an ideal job for Perl.

> ASP is not an option, I'm on UNIX.

Apache/mod_perl/Apache::ASP allows you to take advantage of a very rich
implementation of the ASP object model using everybody's favorite script
language: Perl.

TMTOWTDI[*]

> I keep hearing different stories about which of the two (Perl vs CGI)
> performs better on large loads (you'd think I was talking about a laundry
> detergent wouldn't you?)

An in-process PHP implementation will be able to process more requests
faster than a CGI -> Perl system.  Apache/mod_perl lets you run Perl
scripts in-process, without sacrificing flexibility or power by using
PHP.

> Perl or PHP3?

As someone else asked: What answer do you expect from comp.lang.perl.*?
I see you've cross-posted to a php NG as well.  What answer did you
expect from them?  ;)

> PS: The server admin told me he had to shut down several sites earlier this
> year because of Perl scripts... too many hits, and every hit ran the
> template-grabbing CGI.  He said sites that get less hits but use Perl tax
> the server more than sites that get more hits but use PHP... somehow, PHP
> opens and closes fewer files (that's how it was explained to me) so he's
> strongly pushing for PHP.  Is this all just BS?

This could very well be true.  I've often found that the sysadmin comes
the closest to knowing what really goes on in a web-based company, as
opposed to tech-support who are basically people off the street given
scripts to ask questions like, "Well, is your modem plugged into the
wall?"

This my no means that the scenario your sysadmin described is the only
way it _can_ be.  It's quite possible your sysadmin is partial to PHP,
but too many people in this industry are operating the same way you
appear to be running: flying blind, relying on buzzwords and the
incomplete, biased knowledge of arrogant programmers such as myself. ;)

Research it yourself.  But here's a simplified breakdown of PHP and
Perl:

	PHP was created to simplify the creation of dynamic web pages and
	facilitate database integration.  Most things not critical to this
	goal were placed on the back burner or added as an afterthought.

	Perl was designed to do what you asked.  It's right there in the
	PERL acronym itself: Practical Extraction (and) Report Language.
	Text-file processing was one of it's major goals.  Despite it's
	emphasis here, Perl has become so widely used to dynamic web page
	creation that Perl and CGI are synonymous in (way too) many circles.
	
	Besides, if you ever need anyone to program anything outside of a
	web page, PHP has just become a non-issue.  Whereas, Perl is
	everywhere.

Research it some more on your own:
	http://www.php.org/
	http://www.perl.org/
	http://perl.apache.org/

-- 
-Tim Hammerquist <timmy@cpan.org>
Perl can certainly be used as a first computer language, but
it was really designed to be a *last* computer language.
	-- Larry Wall
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads