in reply to Two handy tools for nested arrays: mapat and transpose

I replaced:
$result = matrixwise_map(\&f, $mats); print dumpf($result), $/;
in the above code with:
my @result = matrixwise_map(\&f, $mats); print dumpf(@result), $/;
to give me the same answer as in the comments.

Replies are listed 'Best First'.
Re: Small typo
by tmoertel (Chaplain) on Apr 06, 2005 at 13:47 UTC
    Good catch! To fix the problem, I wrapped the output stage of matrixwise_map inside of ( )[0] to force array context, which is always what we want because we are dealing with matricies.