sub ReadTheEntireFile { my $F = defined $_[0] ? $_[0] : ''; $F =~ tr`<>*?\"\|\x00-\x1F``d; # Remove illegal characters. ... sub CreateFile { defined $_[0] or return 0; my $F = shift; # Remove illegal characters from file name: $F =~ tr`<>*?\"\|\x00-\x1F``d;
$ perl -le' my $x = join "", map chr, 0 .. 255; ( my $y = $x ) =~ tr`<>*?\"\|\x00-\x1F``d; use Data::Dumper; $Data::Dumper::Useqq = 1; print Dumper $_ for $x, $y; ' $VAR1 = "\0\1\2\3\4\5\6\a\b\t\n\13\f\r\16\17\20\21\22\23\24\25\26\27\3 +0\31\32\e\34\35\36\37 !\"#\$%&'()*+,-./0123456789:;<=>?\@ABCDEFGHIJKL +MNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\177\200\201\202\2 +03\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\22 +4\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245 +\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\ +267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\3 +10\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\33 +1\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352 +\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\ +374\375\376\377"; $VAR1 = " !#\$%&'()+,-./0123456789:;=\@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ +_`abcdefghijklmnopqrstuvwxyz{}~\177\200\201\202\203\204\205\206\207\2 +10\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\23 +1\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252 +\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\ +274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\3 +15\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\33 +6\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357 +\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377";

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

Naked blocks are fun! -- Randal L. Schwartz, Perl hacker

In reply to Re: My Perl Obfuscator by jwkrahn
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.