On Fri, 2006-14-04 at 07:07 -0700, chen li wrote:
> Hi all,
> 
> I have a two dimensional array: 
> 
> $array=([1,2,3,4,5,], 
>         [10,20,30,40,50])
> 
> How could I change so that I will get the following
> results using perl?
> $change_array=([1,10],
>                [2,20],
>                [3,30],
>                [4,40],
>                [5,50])
> 
> 
> Thanks,
> 
> Li

Load the module Math::Matrix
http://search.cpan.org/~ulpfr/Math-Matrix-0.5/ and use its transpose
function.


-- 
__END__

Just my 0.00000002 million dollars worth,
   --- Shawn

"For the things we have to learn before we can do them, we learn by doing them."
  Aristotle

* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to