in reply to Re: Late PM, 12/24/2014 & all year long
in thread Late PM, 12/24/2014 & all year long

As it says in the OP sig, ' suspected of being highly OS and version specific, but "Season's Greetings" anyway! '. /me cargo-culted, modified, tweaked the creation procedure repeatedly and finally went back to mere cargo-culting so it would run on the box that was then-available: Win7 & AS Perl v 5.018 and 5.016. Ubuntu box was down, so merely suspected (from docs and other notes and comments) that execution with a different OS (or different Perl, for that matter) would fail. Thanks for confirming and warning others.

As best I understand it, srand and repeated calls to srand may produce inconsistent results even in Perls > 5.12... and (for others interested because they are stuck at some earlier vers.) anything before that is unlikely to work. For (slightly) more detail, see the node referenced in the sig of the OP, Re^2: Slightly Srandom JAPH.

And Happy New Year (or, for latecomers, some other semi-appropriate holiday greeting)!

Replies are listed 'Best First'.
Re^3: Late PM, 12/24/2014 & all year long
by BrowserUk (Patriarch) on Dec 30, 2014 at 00:40 UTC

    Suggestion: When posting code that uses rand, intended for cross-platform consumption & reproducibility: use Math::Random::MT qw[ rand srand ];.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

        Uh ... sorry to be a wet blanket, but it doesn’t help on my system (Strawberry Perl, Windows 8.1, 64-bit):

        19:01 >perl -e "srand 42; print sort {4-rand 9} split //, 'ts aroMrhir +sae C tll!!ym';" l ttyaMeos arrCsrihm!!l 19:01 >perl -e "use Math::Random::Mt qw[rand srand]; srand 42; print s +ort {4-rand 9} split //, 'ts aroMrhirsae C tll!!ym';" l ttyaMeos arrCsrihm!!l 19:01 >perl -v This is perl 5, version 20, subversion 0 (v5.20.0) built for MSWin32-x +64-multi-thread

        :-(

        Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Re^3: Late PM, 12/24/2014 & all year long
by KurtSchwind (Chaplain) on Jan 06, 2015 at 20:55 UTC

    It was in no way meant to be disrespectful. I did see that it was OS dependent which is why I posted my version of the OS and Perl.

    --
    I used to drive a Heisenbergmobile, but every time I looked at the speedometer, I got lost.