Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^6: How do I make a random shuffle deterministic?

by LanX (Canon)
on Dec 06, 2012 at 15:31 UTC ( #1007606=note: print w/ replies, xml ) Need Help??


in reply to Re^5: How do I make a random shuffle deterministic?
in thread How do I make a random shuffle deterministic?

Looks fine for me!

The modules are core and your producing a maximal seed.

Still think it's exaggerated for your problem...

... but it's a good generic solution for similar tasks! =)

My only concern is readability, better use something like ord $char with an explicit loop var my $char

Anyway you are still operating on the assumption that hostnames are always different, since I don't know your project this might be ok or not.

Generating a random seed at installation time would prevent this "problem".

Cheers Rolf


Comment on Re^6: How do I make a random shuffle deterministic?
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1007606]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (16)
As of 2015-07-31 18:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (280 votes), past polls