in reply to A quandry in Towers of Hanoi
while ($numdisks > $loop++) { $string = $string ."x"; push (@polea, $string); }
That could be written more simply as:
my @polea = map 'x' x $_, 1 .. $numdisks;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A quandry in Towers of Hanoi
by pmonk4ever (Friar) on May 15, 2009 at 17:02 UTC |