Ie different between Windows & *nix. And that is the cause of the failures for the obfuYes, I think that's the cause of most of the failures - but not the one that
Athanasius experienced with Strawberry Perl.
My Strawberry Perl 5.20.0 produces the same as
Athanasius got:
C:\_32\strawberry5.20.0>perl -e "srand 42; print sort {4-rand 9} split
+ //, 'ts aroMrhirsae C tll!!ym';"
l ttyaMeos arrCsrihm!!l
But when I switch to 5.18.2 it all works as intended:
C:\_32\strawberry5.18.2>perl -e "srand 42; print sort {4-rand 9} split
+ //, 'ts aroMrhirsae C tll!!ym';"
Merry Christmas to all!!
C:\_32\strawberry5.18.2>
And it also works as expected for me all the way back to 5.8.8 (which is as far back as I go).
From 5.20 on, that problem goes away because of the built-in rand/srand rather inheriting them from the platform C compiler implementation.Agreed, and it was worth doing for that very reason.
I just think they should have mentioned, in the srand documentation, that srand(42) would produce different results (on Windows) for 5.20.0 as compared to earlier perl versions - but the srand documentation (as it stands) suggests to me that no such change is to be expected.
Cheers,
Rob
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.