Can Perl's shuffle be utilized such that each time it produces the outputs in the same order?
Use the srand()
function always with the same seed value (123
in this case). E.g. I get:
$ perl -MList::Util=shuffle -E 'srand 123; say shuffle 1 .. 5'
41352
repeatable every time. Without the srand() call it differs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With