At 12:32 AM 5/17/01 +0500, Tirthankar C.P wrote:


>What is the simplest way to read in a matrix, say
>
>
>19911231 12200 4274
>  19921231 12205 7822
>  19931231 3313 8208
>  19941231 2362 12292
>  19951231 4348 11673
>  19961231 11751 14255
>19971231 6318 12339
>19981231 14901 11530
>19991231 373 17353
>
>
>in perl? I just know that the matrix has to have three rows, but the
>number of columns can vary.

Transpose rows and columns in the above I assume.


my @matrix;
while (<>) {
   push @matrix, [ split ];
}


--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com

Reply via email to