in reply to Random partitions?

This is a bit different version:
sub rnd_part { my ($start, $end, $count) = @_; my $step = ($end - $start) / $count; $start = $step / 2.0; do { printf "%f ", $start + (rand($step) - $step / 2.0); $start += $step; } while ($start < $end); print "\n"; }