What are you talking about?

I am comparing your response to what I wrote, and I am left wondering if you even tried to understand what I said. Certainly you didn't "spot" what you think you did in what I said.

Allow me to demonstrate with sample code:

# Assume you have use Compress::Zlib; use Carp; # Here is the function. It takes text, and returns 3 # possible answers. 1 if the text looks unencrypted. # 0 if it looks encrypted. And undef if it is not able # to tell reliably. sub text_is_normal { my $text = shift; length($text) < 50 ? undef : (length(compress($text)) < 0.8*length($text)); }
There you are. Pass this function some text. It returns one of three answers. The text is normal, uncompressed and unencrypted data. The text is compressed. The text is too short to tell reliably. Good luck finding any reasonable code which fools it.

Do whatever you like with the answers and that code. Including reducing 50 (which is a rather pessimistic bound). There are no questions about taking 3 passes at it. There is nothing about writing this data anywhere. There is just a function that answers the question you asked at the start of this thread.


In reply to Re (tilly) 5: What data is code? by tilly
in thread What data is code? by Beatnik

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.