Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Ah.. 'tis that time of year again when a young hacker's thoughts turn to...obfuscation. And love. The perfect last minute gift idea for your better half. Promise them "extra goodies" if they can figure out how it does what it does. ;)

P.S. Looks fairly clean on a wide screen - one sub per line

#!perl use strict; $_= reverse"rekcaH lreP rehtonA tsuJ";&print; exit; sub Cards($$$){my$__;seek(DATA,0,0);$/="$__";<DATA>=~m((\x21));push(@_ +=>"$1\n");} sub Fun{<DATA>=~/[SEX]/;splice(@_,-1,0,uc $&);$_[$|].=uc$&." ";$_[8]=u +c$&;$_[2].=" ";} sub Flowers{for(reverse sort{($a=~/(m)/i and$*=$1 or $a=~/\W+\w{3}\W+/ +)<=>$b=~/m/i or $a!~/\W+(\w{3}\s+)*?\S+/}keys%SIG){last if$$=chop;nex +t unless$$++;}splice(@_=>1,0=>$*);&TwoLips;} sub TwoLips{($a=(split(/[A-Z]/))[1])=~tr(ansliteration)/ab/cd;splice(@ +_,-3,0,uc chop$a);&Yum;} sub CandyHeart{for(@_){length>5 and next;print;}} sub Yum{eval("use Candy::Chocolates;");if ($@=~/\s*([\w\/]+).pm/){spli +ce(@_,-4=>0,uc chr vec($1,2=>8));splice(@_,-1,0,uc chr vec($1,2,8));$ +_[4].=uc substr($1,-5,1);}} sub Hearts{$==length;@_=(\$$=>\\$$=>\%*=>\*$);for($$=$#_+1;$$;){$!=ran +d($$--+1);$_[$$,$!]=$_[$!,$$];}$#_=4;for(reverse@_){$_ or next;$,=ref +$_;$;=length$,;$^T=0;for(0..($;)-1){$^T+=vec($,,$_,$=/3);}$$=chr$^T/$ +;;;}push(@_=>$$);$,="";&Diamonds;} sub Diamonds{push(@_=>chr(substr($=,-1,1)+substr($=,0,1).substr($=,-1, +1)+substr($=,0,1)));&Clovers;}#Feeling lucky?? sub Clovers{eval;$*=2;$*=uc((split(chr($***$***$**$*)=>$@))[5]);substr +($*,1,1)="";splice(@_,1,0,$*);&Moons;} sub Moons{unshift(@_=>chop(@_[7]),(split''=>(ref \@_))[4]);} sub print($){$$-=$$;$!=@_[$$]=~s(((\W+[\w{4,5}]+?)(\032?(\w+?).*)(?:\1 ++)\x3A{1,2}.+))($2?$1?$3?"$2$1$3":"$3$2$1":"$1$3$2":$1;)e;&Hearts;!$$ + or &Gifts;} sub Gifts{&Cards;&Flowers;&Fun;&CandyHeart;} __DATA__ Data?!? LOVE does not require data! (but this script does!)

In reply to Perl Hackers In Love by turnstep

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2021-12-01 13:11 GMT
Find Nodes?
    Voting Booth?
    R or B?

    Results (10 votes). Check out past polls.