The integer overflow error you got seems very surprising, since I would expect srand JAPH to be the same thing as srand "JAPH", which should be the same thing as srand 0.

On the other hand... I know that my code is dependent on perl having specific implementations of srand, rand, and sort, so if you run it, and it prints out an apparently random shuffling of the letters of HnlcrhJsre_Pt_aeAeuot_, then I wouldn't be surprised.

The version of perl I tested it against was 5.16.0, so I would expect that version of perl to produce the right output.

To create your own (admittedly version specific) JAPH based on this, you can do it the way I did.
perl -e 'print length "just another perl hacker"' 24 perl -e 'my $x = ("a".."z")[23]; print $x' x perl -e 'srand 42; print sort {4-rand 9} ("a".."x")' gnkhwqpiejbaxdlcrfomtsuv perl -e '$_ = join "", "a".."x"; y/gnkhwqpiejbaxdlcrfomtsuv/Just_anoth +er_Perl_hacker/' rerPt_Jtohseauhnalkcer__ perl -e 'srand 42; print sort {4-rand 9} split //, rerPt_Jtohseauhnalk +cer__' Just_another_Perl_hacker
This time, this was done with 5.12.1.

In reply to Re^2: Slightly Srandom JAPH by BenGoldberg
in thread Slightly Srandom JAPH by BenGoldberg

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.