I tried running your script using:

perlcritic --harsh --statistics script.pl

The results were, well, more than I thought that I would get:

1 files. 1 subroutines/methods. 8 statements. 14 lines, consisting of: 2 blank lines. 1 comment lines. 0 data lines. 11 lines of Perl code. 0 lines of POD. Average McCabe score of subroutines was 1.00. 17 violations. Violations per file was 17.000. Violations per statement was 2.125. Violations per line of code was 1.214. 6 severity 4 violations. 6 severity 2 violations. 5 severity 1 violations. 5 violations of CodeLayout::RequireConsistentNewlines. 1 violations of CodeLayout::RequireTidyCode. 1 violations of Compatibility::PerlMinimumVersionAndWhy. 1 violations of Editor::RequireEmacsFileVariables. 3 violations of InputOutput::RequireCheckedSyscalls. 3 violations of Miscellanea::RequireRcsKeywords. 1 violations of Modules::RequirePerlVersion. 1 violations of Modules::RequireVersionVar. 1 violations of Subroutines::RequireFinalReturn.

In reply to Re: Defining a sub within a sub: OK? by Khen1950fx
in thread Defining a sub within a sub: OK? by talexb

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.