while ($numdisks > $loop++) { $string = $string ."x"; push (@polea, $string); }
That could be written more simply as:
my @polea = map 'x' x $_, 1 .. $numdisks;
In reply to Re: A quandry in Towers of Hanoi
by jwkrahn
in thread A quandry in Towers of Hanoi
by pmonk4ever
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |