"Your code removes control characters and certain punctuation but does not remove non-ASCII characters. Is this intentional?"

Well, I really didn't have to include that line, but I did anyway just to be consistent. If I'm going to disallow certain characters in a file name when reading, then I would do the same for creating a file just to be consistent. The reason I chose to ban these characters is because they may be used for bad purposes when reading a file, and they're illegal anyway if you look at the file system specs. The NTFS and FAT file systems disallow creating files with characters 0x00-0x1F and you also can't have files that include: > < * ? | " but it's ok to have a file which contains characters from the extended ASCII chart (0x80-0xFF).


In reply to Re^2: My Perl Obfuscator by harangzsolt33
in thread My Perl Obfuscator by harangzsolt33

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.