Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

In the bad old days, Perl-based CGIs were started by spawning a new interpreter for each request. As you might imagine, this was very expensive and not very scalable. You could be parsing a multi-megabyte flat-file, but start up time would still be the limiting factor for speed. These days, you can use mod_perl to embed the interpreter right into Apache (there are similar solutions for other web servers). Though there are places with a lot of legacy scripts (like where I work) that simply can't run under mod_perl.

As far as the embedded interpeter goes, mod_perl and mod_php do the same thing for their respective language (mod_perl also gives you access to the underlieing Apache API--I'm not sure if mod_php does this). PHP as a language is basically Perl with all the fun parts taken out. Some would argue that the "fun parts" make Perl hard to learn. Even so, whenever I dabble in PHP, I always seem to knock against a problem that is easily solved in Perl, but takes a lot of hoop-jumping to do in PHP, despite the apparent similarities. Admittedly, this may have more to do with my relative experiance with Perl and PHP.

Don't make the mistake of saying CGI == Perl. CGI is just a standard for how http servers translate data coming from an http client to a user-space program. Any time you see a server-side program take over generating a page, it's using CGI or something that looks suspiciously similar.

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

Note: All code is untested, unless otherwise stated


In reply to Re: CGI/Perl vs PHP by hardburn
in thread CGI/Perl vs PHP by gilbert0

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-03-29 07:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found