Not sure I quite understand, however perl has it's own rand functions that's quite useful if you want to write a plugin to do something with random that isn't provided by the code. So I don't really have to understand and implement it and you can still write it in perl.
http://perldoc.perl.org/functions/rand.html