#! perl -slw use strict; use Time::HiRes qw[ time ]; use Algorithm::Combinatorics qw[ variations_with_repetition ]; my $start = time; my @in = qw[ 0.0 0.2 0.4 0.6 0.8 1.0 ]; my $iter = variations_with_repetition( \@in, 11 ); my $c = 0; while( $_ = $iter->next ) { print join "\t", @$_, 1 , 1; ++$c; } printf STDERR "Took: %f seconds [$c]\n", time() - $start; __END__ C:\test>1208610 | wc -l Took: 3444.838110 seconds [362797056] 362797056