@'={$}=>,{}=>0x70,*,,0x6A,$={$$}=>0x68,*,,0x61,}; $..=chr$_ foreach sort keys%{@'}; $_=$.,s<^.*(.)(.)(.)(.)>@$2$4$3$1@.print;
Apparently perl 5.6 (or at least, ActiveState's perl 5.6.1) does strange, bizarre things when you try to set $, to some value that begins with \x00:
C:\>perl -e "$, .= qq[\x00hjap]; print $,;" mult C:\>perl -e "$. .= qq[\x00hjap]; print $. ;" hjap C:\>perl -e "$; .= qq[\x00hjap]; print $; ;" hjap
That first blank character there in the first two output lines is character 0, not a space; with $; you first see character 28, then character 0, then hjap. (my browser won't let me enter character number 28 - even if it could, that's not nice content on an html page) Note that perl 5.8 (though I've only tried cygwin's) does what you'd expect.

I have my suspicions that what's happening in per 5.6 is that it's looking at some spot inside memory that's based on the string's length - for any string that's less than 8 characters, what happens is that I get that many characters returned of \x00multi-; for larger strings I get something like this: (not a real code block, so that I could paste in all those whacky special characters in the 1-31 range)

C:\>perl -e "$, .= qq{\x00abcdefghijklmnopqrstuvwxyzaabbccddeeffgghhiijjkkllmmnn ooppqqrrssttuuvvwwxxyyzzaaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrss stttuuuvvvwwwxxxyyyzzzaaaabbbbccccddddeeeeffffgggghhhhiiiijjjjkkkkllllmmmmnnnnoo ooppppqqqqrrrrssssttttuuuuvvvvwwwwxxxxyyyyzzzz}; print $,;" ad ◄ ┴ ðBâ☺ Bâ☺¶?â☺Þ>â☺d>â☺D=â☺┤<â☺ý;â☺Ó:â☺$;â☺└9â☺,9â☺ÿ8â☺♀8â☺É:â☺¶6â☺ x6â☺╠5â☺(5â☺ÿ3â☺©2â☺d2â☺l%â☺©)â☺t4â☺8)â☺(!â☺l∟â☺©←â☺­→â☺@→â☺ÿ↨â☺8↨â☺ÿ▬▬â☺t§â☺ȶâ ☺►¶â☺`‼â☺¼↕â☺Ó◄â☺T◄â☺░►â☺ð☼â☺h☼â☺▄♫â☺┴ · Èîâ☺ê┤â☺efghijklmnopqrstuvwxyzaabbc cddeeffgghhiijjkkl
--
@/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/; map{y/X_/\n /;print}map{pop@$_}@/for@/

In reply to Cross-perl-version compatible version by fizbin
in thread Rising Force by cristian

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.