in reply to Re: Cartesian Cross-Products
in thread Cartesian Cross-Products
Mike (mrdvt92)perl -e ' use strict; my @a=qw{1 2 3}; my @b=qw{4 5}; my @c=(); foreach my $a (@a) { foreach my $b (@b) { push @c, [$a, $b]; } } print join("\n", map {join ",", @$_} @c), "\n" ' --- 1,4 1,5 2,4 2,5 3,4 3,5
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Cartesian Cross-Products
by waba (Monk) on Apr 23, 2008 at 20:39 UTC | |
|
Re^3: Cartesian Cross-Products
by Anonymous Monk on Apr 15, 2009 at 19:09 UTC | |
by saenns (Initiate) on Aug 09, 2010 at 17:33 UTC | |
by psini (Deacon) on Aug 09, 2010 at 17:54 UTC | |
by drt (Initiate) on Feb 15, 2012 at 21:54 UTC | |
by Anonymous Monk on Jan 20, 2010 at 23:23 UTC |