Hello phirun and welcome to the monastery,

you already had nice answers and a useful thread to read, just to add my 2 cents.

bliako is right with:

> Caveat: the motto "only Perl can parse Perl" very frequently pops up in these sort of questions.

But a perl document can be parsed by PPI and pod and comments easily removed

# the entire document: >perl -MPPI -e "print PPI::Document->new('example.pl')" use strict; use warnings; # safety net loaded my %ha = ( # dont use one letter variables 'ha' => 1, # this stand for.. 'he' => 2, # and this other for ); =pod =h4 documentation =cut print $ha{'ha'}."\n"; # other unuseful comment __END__ # the stripped document >perl -MPPI -e "$doc = PPI::Document->new('example.pl'); $doc->prune(' +PPI::Token::Pod'); $doc->prune('PPI::Token::Comment'); print $doc->se +rialize" use strict; use warnings; my %ha = ( 'ha' => 1, 'he' => 2, ); print $ha{'ha'}."\n"; __END__

So you can take a big enough perl document ( 1Mb ?) with lot of comments and pod, setup a non persistent weberver (with my limited experience I mean: a server which load the content at each request) and use ab to spot differences between serving the stripped and the complete document. Have fun ;)

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

In reply to Re: Performance penalties of in-Perl docn vs compiled CGIs. by Discipulus
in thread Performance penalties of in-Perl docn vs compiled CGIs. by phirun

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.