in reply to Re: My first JAPH
in thread My first JAPH

Sorry, my English isn't very good. What do you mean?

--
Johannes Laire

Replies are listed 'Best First'.
Re^3: My first JAPH
by goibhniu (Hermit) on Oct 30, 2007 at 17:29 UTC

    PRNG: Pseudo Random Number Generator

    I don't quit understand how the rand function works in this JAPH. That's part of what makes it a cool JAPH; I don't quite understand it.


    I humbly seek wisdom.

      Ah, thanks!

      The key idea is that if you print a string of length n, then "\r", and then a string of length n-1, the last char of the first string remains visible.

      The loop just prints random strings of length $" (followed by "\r") until the last char matches the corresponding char in "Just another Perl hacker,". Then $" is decremented, and this is repeated until $" is zero. The explanation might or might not help.

      I got somewhat esoteric ideas when golfing this and the final JAPH is indeed quite difficult to understand; even for me, after not thinking about it for a while.

      --
      Johannes Laire