Regarding the code examples, I probably would have ended up somewhere in between. The OP used C-style for loops which would be better written as (0..12) and could have used more meaningful variables than $i and $j (like $row and $column) and used constants in place of the magic numbers 6 and 12, but it's legible. Your maps are cool, but take much longer to read than a for loop.
For example, I would change this:
to this:my @nums = map { [qw/01 02 03 04 05 06 07 08 09 10 11 12/], } 1 .. 12;
No doubt this looks horrible to you, but anyone can see what it does in a quick scan. At the very least, I would change your map to a for(), since it doesn't actually use the 1..12 for anything but looping.# build the grid my @grid; my @row = qw/01 02 03 04 05 06 07 08 09 10 11 12/; for (1..$NUMBER_OF_ROWS) { push @grid, \@row; }
In reply to Re^8: Thread on Joel on software forum : "I hate Perl programmers."
by perrin
in thread Thread on Joel on software forum : "I hate Perl programmers."
by techcode
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |