Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
any ideas?$N = 4; ###Initialize all values to 0 for ($I=1;$I<=$N;$I++) { for ($K=1;$K<=$N;$K++) { $table[$I,$K] = 0; } } ### Fill table in with needed info for ($I=1;$I<=$N;$I++) { for ($K=1;$K<=$N;$K++) { if ($I > "$K") { $table[$I,$K] = "1"; } else { #other Junk } } } ### Prin table out for viewing for ($I=1;$I<=$N;$I++) { $Left = $M; for ($K=1;$K<=$N;$K++) { print "$table[$I,$K] : "; } print "\n"; } the expected output is: 0 : 0 : 0 : 0 1 : 0 : 0 : 0 1 : 1 : 0 : 0 1 : 1 : 1 : 0 HOWVER the is the following: 1 : 1 : 1 : 0 1 : 1 : 1 : 0 1 : 1 : 1 : 0 1 : 1 : 1 : 0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: matrix's
by btrott (Parson) on Nov 02, 2000 at 04:28 UTC | |
|
(tye)Re: matrix's
by tye (Sage) on Nov 02, 2000 at 04:31 UTC | |
|
The plural of "matrix" is "matrices"
by arturo (Vicar) on Nov 02, 2000 at 04:30 UTC | |
|
RE: matrix's
by AgentM (Curate) on Nov 02, 2000 at 04:28 UTC |