Article View: comp.lang.perl.misc
Article #93Re: - For this type of use (see msg), should I use Perl of PHP3?
From: Tim Hammerquist
Date: Sat, 23 Sep 2000 00:00
Date: Sat, 23 Sep 2000 00:00
80 lines
4168 bytes
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
Technical Details
Message-ID:
<slrn8sqcku.ke.tim@degree.ath.cx>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<LsVy5.2075$YP1.97885@weber.videotron.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa0ae,235b7ac45355738c X-Google-Attributes: gidfa0ae,public X-Google-Thread: 1156bd,235b7ac45355738c X-Google-Attributes: gid1156bd,public From: tim@degree.ath.cx (Tim Hammerquist) Subject: Re: - For this type of use (see msg), should I use Perl of PHP3? Date: 2000/09/23 Message-ID: <slrn8sqcku.ke.tim@degree.ath.cx> X-Deja-AN: 673344946 References: <LsVy5.2075$YP1.97885@weber.videotron.net> X-Editor: Vim-507 http://www.vim.org/ X-Trace: newsfeed.slurp.net 969748341 206.100.200.84 (Sat, 23 Sep 2000 17:32:21 CDT) User-Agent: slrn/0.9.5.7 (UNIX) NNTP-Posting-Date: Sat, 23 Sep 2000 17:32:21 CDT Newsgroups: comp.lang.perl.misc,cz.comp.lang.php