Simple use of Algorithm::Loops, but so simple I didn't test it. (:

#!/usr/bin/perl -w use strict; use Algorithm::Loops qw( NestedLoops MapCarE ); my @data = ( [ [1, "Darth Vader"], [3, "Luke Skywalker"], [5, "Obi Wan Kenobi"], ],[ [0, "Lighsabre "], [5, "Blaster"], [9, "Rocket launcher"], ],[ [10, "Dagobah"], [14, "Kashyyyk"], ], ); my @joined= NestedLoops( \@data, sub { my( $dig, $txt )= MapCarE { [ @_ ] } @_; [ join('',@$dig), join(', ',@$txt) ]; }, ); for( @joined ) { print join("\t",@$_), $/; }

- tye        


In reply to Re: All Combinations of three arrays. (Algorithm::Loops) by tye
in thread All Combinations of three arrays. by holli

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":