in reply to Creating tuples based on sets
If a ref return value is wanted, just change "return @els" to "return \@els" in the sub that make_permutator returns.my @elements = qw(a b c); my $tupler = make_permutator(([@elements]) x 2 ); while (my @tuple = $tupler->() ){ print @tuple,"\n"; }
|
|---|