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

JAPH

by Anonymous Monk
on May 02, 2000 at 23:27 UTC ( #9973=obfuscated: print w/ replies, xml ) Need Help??

My first Obfuscation:
#! /usr/bin/perl @k = unpack "a"x5,'x_,d@';@o = unpack "a"x24,'GY$]@^R ]-bV,9*oP,Q&`Oq[ +'; while ($i<24){print chr((ord($o[$i])-ord($k[$i++%5])+91)%91+32);}

Comment on JAPH
Download Code
RE: JAPH
by Adam (Vicar) on May 03, 2000 at 04:50 UTC
    Good use of unpack and ord, but watch out for things that generate warnings. Some people will disagree with me, but I think that even obfuscated code should avoid warnings:
    %perl -w japh.pl
    Use of uninitialized value at japh.pl line 3.
    Use of uninitialized value at japh.pl line 3.
    Just another Perl hacker
    
    BTW: the warning is from the $i in the while loop. If you add some garbage to shift your array (so that you can start from 1 instead of 0) you could preincrement $i just before your loop, or hide your initialization somewhere.Maybe monkey with $[

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (12)
As of 2014-09-17 14:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (82 votes), past polls