Wiser monks than I may well offer suggestions in the vein you suggested, but ++.

Update: However, unless I misread this, your randomization does NOT account for the differing quantities of available/extant "numbers (10)," "symbols (depends on character set)," "UC_letters (ditto)," and "lc_letters (ditto again)." If I'm correct, that may induce a pattern of output that would be detectable over a relatively small sample, and thus might reduce the work involved in breaking the p/w generated. OTOH, that might actually make breaking the p/w harder. Comments, anyone?   </update>

Also, the comment at line 81 doesn't seem quite right, in the overall context since to achieve exclusions, such as -N, the invocation must have multiple arguments -- one for length, and one for the exclusion.

One other trivial and highly personal observation (YMMV), I find the use multiple dashes as leading- and trailing-sub/function/etc delimiters (eg, lines like 9, 18, 21 & 33) "intrusive" (for lack of a better word) and somewhat un-lazy. FW(little)IW, a pair of newlines generally achieves - for me - the kind of clarity you're seeking (for which, another ++).


In reply to Re: genpass Password Generator by ww
in thread genpass Password Generator by munkyeetr

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.