Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: my first JAPH

by blakem (Monsignor)
on Sep 05, 2001 at 01:56 UTC ( [id://110174]=note: print w/replies, xml ) Need Help??


in reply to my first JAPH

Very nice. I like the evaled reversed code, for@rof is quite cool.

I think your substitutions are a bit too decipherable.

Good: $Y=~s/\(/m4vg/g; Better: $Y=~s s\(sm4vgsggsi; Good: $Y =~ s/\)/\(/g ; Better: $Y =~ s s\)s(sggsi ; Good: $Y=~s/m4vg/\)/g; Better: $Y=~s(m4vg))\))g;
Very commendable for a first japh though.

-Blake

Replies are listed 'Best First'.
Re: Re: my first JAPH
by jake (Pilgrim) on Sep 06, 2001 at 01:42 UTC
    Thanks for the tips. I'll definately keep these in mind for now on. Here is what it looks like using your suggestions:
    #!/usr/bin/perl @rof=qw(4 13 -1 9);@rof=reverse(@rof); $dro = 'A' ; sub Z{ eval $_[0] };$Y='; for@rof ( (++ord$dro +_$ )rhc ) tnirp; '; $Y; sub X { return reverse $_[0] }; $Y=~s s\(sm4vgsggsi;$Y=~s s\)s(sggsi ; $rof;$Y=~s(m4vg))\))g;$Y=X($Y); Z($Y);
    I tried a few more ideas in this last version:
    #!/usr/bin/perl ;@rof=qw(4 13 -1 9);@rof=reverse(@rof); ;sub gg{eval$_[0]};$dro='A';$q=''."".'; ;for@rof((++ord$dro+_$)rhc)tnirp;(q$)g; ;';$q||=$gg;sub g{return reverse$_[0]}; ;$q=~s)\()\"\')g;$s||=$q;$s=~s~\)~\(~g; ;$g=$s;$g=~s^\"\'^\)^g;$g=g($g);gg($g);
    And now I shall retire this obfuscation and start working on my next one...

    --jake
    "This space intentionally left blank" -Zork

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-20 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found