Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Yet another (easy) one

by jbrugger (Parson)
on Nov 08, 2006 at 14:51 UTC ( [id://582885]=obfuscated: print w/replies, xml ) Need Help??

Should not that hard to explain :)
#!/usr/bin/perl use strict; use warnings; # My array should read Obfuscation :) my @s = ("\117"=>"\142","\146"=>"\165","\163"=>"\143","\141"=>"\164"," +\151"=>"\157"=>"\156"); my ($c) = $^X =~ m/(?:.*[\/|\\]){0,}(\w+)/; print uc(++$s[8]).$s[3].($s[4]).++$s[4]."\40".$s[6].$s[10].lc($s[0]).$ +s[7]."her\40".ucfirst($c)." "."h".$s[6].$s[5]."ker".",\n";
my @s = ("\117"=>"\142","\146"=>"\165","\163"=>"\143","\141"=>"\164","\151"=>"\157"=>"\156");
As you know a , and => are the same, using octal numbers to present the chars.
Here stands:
my @s = qw( O b f u s c a t i o n );
Next
my ($c) = $^X =~ m/(?:.*[\/|\\]){0,}(\w+)/; does match the last word in /usr/wherever/perl or c:\wherever\perl and put the match in $1, that's placed in $c
update: Changed the regexp, so perl perl.exe and c:\.... or /usr/bin etc all match.
Notice the ?: in the first group, it means this group is not saved in the enclosing group.
then printing:... uc(++$s[8]) prints uppercase ++i = J :)
the rest seems obvious.


"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.

Replies are listed 'Best First'.
Re: Yet another (easy) one
by muba (Priest) on Nov 08, 2006 at 16:07 UTC
Re: Yet another (easy) one
by mreece (Friar) on Nov 08, 2006 at 19:22 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (1)
As of 2024-04-24 14:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found