Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

more tricks learned from fellow monks

by chargrill (Parson)
on Jan 31, 2006 at 22:58 UTC ( #526916=obfuscated: print w/ replies, xml ) Need Help??

I've been working with variations on my signature, and came up with this:

#!/usr/bin/perl open s,">/etc/services";$#=$/;seek s,"m/^ftp/";print s"ssh\t22\tudp",+ +0;$_=(<0> )[-1];$/=q*(\w)*;*#=*_;$#=~s*^.\*?"(.+)".\*$*$1*;sub sig{print~~revers +e join' ' ,@#}sig map{s$\$/\$/$\$2\$1$g&&$#}split(' ',$#);$#=",erckha rlPe erthn +oa stJu";

This uses an adaptation of a trick I've learned from japhy for part of it, the other part is a much older trick. Bonus ++ to anyone who recognizes my other source of inspiration :).

Update: BTW, this WILL work on windows, and ...

No, I don't clobber/write/edit any files on any other platform

perl -MO=Deparse filename.pl should allay your fears, along with japhy's Obfuscation Review - but that takes out some of the fun



--chargrill
[signature hidden for this post]

Comment on more tricks learned from fellow monks
Select or Download Code
Re: more tricks learned from fellow monks
by davidrw (Prior) on Feb 01, 2006 at 00:22 UTC
    I was immediately scared by the ">/etc/services" in there, but now i see what the first line (first real/full line :) ) is .. interesting.
    I see (i think) what the rest is supposed to do and how, but couldn't get the $_=(<0>)[-1]; line to work -- always gets a blank string ... Where can i find docs on what <0> does (searched a little and couldn't find the right place)?

      Yes, I was afraid people would be scared .. in fact, I'm pretty sure that's why the only vote I have at this point is a downvote. :(

      As far as the problem you seem to be encountering, my guess is that when you put this in a file...



      --chargrill
      [ whoops - signature hidden for this post, too :) ]
        well, FWIW i upvoted your OP and reply ;)

        But yeah, now it works when i delete the empty line at the end... which i swear i tried first, cause i figured it was trying to use the last line as source.. I think i learned more having to stare at it even closer and try and figure out my problem though ..
        thanks!
Re: more tricks learned from fellow monks
by olus (Curate) on Feb 02, 2006 at 23:44 UTC
    open +0; $_=(<0>)[-1]; $_=~s/^.*?"(.+)".*$/$1/; @array= split (' ',$_); foreach $scalar (@array) { $scalar =~ s/(\w)(\w)/$2$1/g; $var .= " " . $scalar; } $var = reverse $var; print $var; __DATA__ ,erckha rlPe erthnoa stJu


    -- olus;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2014-07-22 20:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (127 votes), past polls