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
    Hello jwkrahn,

    Thank you for your suggestion, it worked perfectly!

    ki6jux

    "No trees were harmed in the creation of this node. However, a rather large number of electrons were somewhat inconvenienced."