Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Self-explanatory program of free will

by Courage (Parson)
on Jun 09, 2002 at 22:21 UTC ( [id://172988]=obfuscated: print w/replies, xml ) Need Help??

Below is a program (not -w-clean, of course) that runs and even prints certain result.
exit if s ee you any point why program this can not start its run of life and print or do'not print what it decides to thus giving us example of free will!'
If perl 5.8.0(pre) is used (5.6.1 is not enough), then it will explain using better English:
exit if s ee you any point why program this can not start its run of life and print or do not print what it decides to thus giving us example of free will
You will say it has common in spirit with Man's ravings? No.?
Yes, it has. But when I was younger I was refered to as vkonovalov!

Still not finally sure whether this code snippet better fits to poetry section...

Courage, the Cowardly Dog.
PS. Something fishy is going on there, or my name is Vadim Konovalov. And it's not.

Replies are listed 'Best First'.
Re: Self-explanatory program of free will
by vladb (Vicar) on Jun 11, 2002 at 14:18 UTC
    Hmm, indeed Perl is very peculiar in its faculties. One can cleverly disguise a perl code for a plain text. Here, I've tried to spoil your obfuscation a bit. It ends up being just a couple statements. And the text that is getting printed is the result of substitution on the '$_' scalar. Since, $_ initially doesn't hold anything, by replacing '' (nothing) with ' you any point why program this can not start its run of lif', this text is saved in the '$_' variable, which you then output with the print; method.
    exit if s// you any point why program this can not start its run of lif/ and print "$_" or do'not print what it decides to thus giving us example of free will! +'


    _____________________
    $"=q;grep;;$,=q"grep";for(`find . -name ".saves*~"`){s;$/;;;/(.*-(\d+) +-.*)$/; $_=["ps -e -o pid | "," $2 | "," -v "," "];`@$_`?{print"+ $1"}:{print" +- $1"}&&`rm $1`; print$\;}
      Indeed.

      And perl -MO=Deparse xx.pl for latest perl with second version of that program gives intresting result:

      perl -MO=Deparse xx.pl exit if s// you any point\nwhy program this can not start\nits run o +f lif/ and print $_ or do !print('it'->what('to'->decides('giving'->t +hus('example'->us('free'->of('will')))))); xx.pl syntax OK
      :)

      Courage, the Cowardly Dog.
      PS. Something fishy is going on there, or my name is Vadim Konovalov. And it's not.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: obfuscated [id://172988]
Approved by sm3g
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-10-15 03:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.