Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

use strict;

by Corion (Pope)
on Sep 20, 2000 at 04:50 UTC ( #33227=obfuscated: print w/ replies, xml ) Need Help??

This code is my first obfuscation, and my birthday present to me :-). It's based on a feature discovered by Ovid and mainly uses that one - in obvious and surprising ways I think.

It dosen't pass -w but it uses strict; (weird, eh ?), and it works at least with ActiveState Perl 5.005_03 (but reportedly not with 5.6)

Enjoy

Update: A spoiler/explanation is now available on my home node

More Update: I've got some reports that this obfuscation also works under ActiveState Perl 5.6, which I didn't test. Thanks to isotope and Tye.

#!/usr/bin/perl ;s ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; use strict ;s ;s You can never use it too much ;s ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;$~;$~=($~=~$~,",~$~=~$)=~$;~$=;;; ;;;; ;;;; Dear Friend, ~=$~=-$$-=~$~"=~ Use =~$"=~$",0=~$"=~ strict. $~ =~"$~"=~$~ =~ Be ,"=~$~=~s","=~ Another ~==============~ Hacker "),".$~$$~$.",$~ and $~=~0,$~=~s~=\~~ Just ~, $~ =~ Love %$$;$~=~s~.=+\~~ Perl ~,$~=~print$~,=~ Forever ;$~;0000000000;$~;

Comment on use strict;
Download Code
(Ovid) RE: use strict;
by Ovid (Cardinal) on Sep 20, 2000 at 05:13 UTC
    Very nice! I love it :) Never saw $~ before now.

    Just to clarify things, I think it was a bug, and not a feature that I uncovered. For those who are curious, you can read about it here.

    Cheers,
    Ovid

    Join the Perlmonks Setiathome Group or just go the the link and check out our stats.

RE: use strict;
by isotope (Chaplain) on Sep 23, 2000 at 04:10 UTC
    It works fine on my perl v5.6.0 built for sun4-solaris

    --isotope

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (16)
As of 2014-07-29 13:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (217 votes), past polls