What do you need a module for?
#!/usr/bin/perl -l # http://perlmonks.org/?node_id=1193761 use strict; use warnings; my @list1 = qw( a b c ); my @list2 = qw( 1 2 ); my $reverse = 0; my @combinations = map { my $left = $_; map "$left $_", $reverse++ % 2 ? reverse @list2 : @list2 } @list1; print for @combinations;
In reply to Re: Minimally changing combinations
by tybalt89
in thread Minimally changing combinations
by Yary
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |