SarahM++ for a fun obfuscation! You had me going in circles for a few minutes... I felt like I was chasing my tail!

Deobfuscation follows:
First we strip out all the comments being careful to remove *only* the comments. That leaves us with:
sub p () { use constant P=>' )'; use constant Q=>'* '; substr(P,1,1); } sub q () { eval join '', split /./, s//rxlgcdjqfvbpsohduwyvcmbjdxopd/ & map { tr/[a..z]/[z..a]/ . P | Q } split //; } $, = p; print q; #Just Another Perl Hacktress ;^P
That last line fooled you didn't it?

The q subroutine is only there to confuse you and is not used at all. So we strip it out leaving us with:
sub p () { use constant P=>' )'; use constant Q=>'* '; substr(P,1,1); } $, = p; print q; #Just Another Perl Hacktress ;^P
"What is she up to?", you ask?
$, (output field seperator) is set to the return value of the p subroutine (a space) but the real purpose of the p subroutine is to set the value of the P constant to the string ' )'. $, is not even used so let's strip it down again.
use constant P => ' )'; print q; #Just Another Perl Hacktress ;^P
This can be rewritten as:
 print ' #Just Another Perl Hacktress '^' )'

A space XORed with a space yields a null (\000). A number sign (#) XORed with a ) yields a newline (\n).
The output is '\000\nJust Another Perl Hacktress '.

Fixed typo. Thanks LAI!


In reply to Re: A Hacktress' First Attempt by Mr. Muskrat
in thread A Hacktress' First Attempt by SarahM

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.