Hi hilitai,

Your module is very readable; nice job!

I particularly like your use of pod, intermixed with the code in such a way that each subroutine is documented by the corresponding pod block.  (It may be a more common technique than I'm aware, but I haven't seen it before).

Here are a couple of minor suggestions, all related to open:

  1. You might consider using lexically-scoped filehandles, via FileHandle or IO::File.  Using IN runs the risk of stomping on a globally-defined IN from somewhere else (eg. the calling program).  (Same with EXP).
  2. You don't need quotation marks around $basefile in open(IN, "$basefile").  (Same with $expFile).
  3. Why not use the 3-argument form of open?

s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

In reply to Re: RFC: Any and all comments welcome on style/technique in new module to calculate G statistic by liverpole
in thread RFC: Any and all comments welcome on style/technique in new module to calculate G statistic by hilitai

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.