I have a number of arrays @c = qw[1 2 3 ] @d = qw[4 5 6 ] @e = qw[7 8 9 ]
and I want to find all possible combinations of all elements
eg 1,4,7 1,4,8 1,4,9,
1,5,7 1,5,8, 1,5,8
This is the code:
for $c (@c) {
for $d (@d) {
for $e (@e) {
print "$c $d $e\n" ;
}
}
}
Is there a package which iterates over arrays?
Thanks,
Peter
_______________________________________________
Perl mailing list
[email protected]
http://perl.org.il/mailman/listinfo/perl
