The "Trick" in apache is this: Put a perl script in the main directory with a name like "graph" Then in the apache conf do: <Location /graph> SetHandler cgi-script </Location> (You may also have to set "Options ExecCGI" on either the location or the directory it is in) In your perl script, using "use CGI;" of course you can get the path from your $cgi variable like this: use CGI qw(:standard); my $cgi = new CGI; my $path = $cgi->path_info(); If you went to the site "http://x.org/graph/blue/green/fun.gif" then $path would be set to "/blue/green/fun.gif" Now you can split on / and get your args. If you are getting you data from a DB and want cache's out in the world to cache data that rarely changes, send the proper "Expires: ..." header or the "Last-Modified: ..." header. Building your code inline like this and adding the extra headers all you need to do for the caches. I built a cache in front of a site like this and it saved me about 60% of the load on my processor.

In reply to RE: Using a question mark is not necessary for CGI by Anonymous Monk
in thread Perl solutions for large web sites? by Anonymous Monk

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.