in reply to Re^2: help with simplifying program
in thread help with simplifying program
You should figure this out yourself!! Read the documentation!!
use strict; use warnings; use Algorithm::Combinatorics qw(combinations); my $rep = 5; # should be 100 my @data = 0..$rep; my $iter = combinations( \@data, 4 ); while( my $p = $iter->next ) { my ( $z, $y, $x, $w ) = @$p; next unless $w-2*$x+$y or $x-2*$y+$z; print "$w, $x, $y, $z\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: help with simplifying program
by crunch_this! (Acolyte) on May 24, 2013 at 21:22 UTC |