in reply to Inputing vectors into a scrabble-esque game
For purposes of maintenance and code validation the @letter initialization code may be better written:
my @letters = ('a') x 9, ('b') x 2, ('c') x 2, ('d') x 4, ('e') x 12, ('f') x 2, ('g') x 4, ('h') x 2, ('i') x 9, ('j') x 1, ('k') x 1, ('l') x 4, +('m') x 2, ('n') x 6, ('o') x 8, ('p') x 2, ('q') x 1, ('r') x 6, ('s') x 4, +('t') x 6, ('u') x 4, ('v') x 2, ('w') x 2, ('x') x 1, ('y') x 2, ('z') x 1;
and of course you should always use strictures.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Inputing vectors into a scrabble-esque game
by johngg (Canon) on Nov 02, 2019 at 16:40 UTC | |
by GrandFather (Saint) on Nov 03, 2019 at 10:03 UTC |