|P is for Practical|
Re: 2d arrayby CountZero (Bishop)
|on Jan 03, 2013 at 20:52 UTC||Need Help??|
Printing your 2D array is done much easier, less error prone and more "perlish" as follows (if you do not want to use the Data::Dump or Data::Dumper functions):
Actually your print routine contains an error: it only works because you have the same number of columns as rows! Do you spot your error?
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey JamesMy blog: Imperial Deltronics