I have list, @x, that is actually a flattened list triples:
@x = (( $x1a, $x1b, $x1c), ( $x2a, $x2b, $x2c), ( $x3a, $x3b, $x3c), .
+.. etc ... ($xna, $xnb, $xnc));
What's the nice perlish to map this back to an LOL of triples:
[[$x1a, $x1b, $x1c], [$x2a, $x2b, $x2c], [$x3a, $x3b, $x3c], ... etc .
+.. [$xna, $xnb, $xnc]]
I'm using an explicit loop with three shifts
to pull off the elements by threes. It works, but I'd like to learn the more idiomatic perlish solution.
Thanks for the insight --