in reply to Re: A Random Fortune Cookie
in thread A Random Fortune Cookie

It's a special case of the Fisher-Yates shuffle, IIRC.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^3: A Random Fortune Cookie
by LanX (Saint) on Mar 10, 2021 at 22:39 UTC
    AFAIK does Fisher-Yates start with the highest range in rand not the lowest.

    The proof may contain similar elements but I have trouble seeing the obvious analogy...

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery