in reply to Transpose a bi-dimensional array

tye has written a tool that should serve your purpose. Have a look at mapcar

use mapcar; my @matrix = ( [ qw(ab cd ef gh)], [ qw(ij kl mn op)], [ qw(qr st uv wx)] ); my @transposed = mapcar {[@_]} @matrix; print join( " ", @$_), $/ for @transposed; __END__ ab ij qr cd kl st ef mn uv gh op wx
Update
mapcar is now a function in tye's Algorithm::Loops.

The above example would becpme:

use Algorithm::Loops qw(MapCar); my @matrix = ( [ qw(ab cd ef gh)], [ qw(ij kl mn op)], [ qw(qr st uv wx)] ); my @transposed = MapCar {[@_]} @matrix; print join( " ", @$_), $/ for @transposed;

With exactly the same result.