Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2024-05-18 17:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found