My own code, for a class I had
in reply to Recursion: The Towers of Hanoi problem
Number of discs is supplied as $ARGV so, yeah. You could continue to play with this to see how much more it will compress. (I really didn't like the TA's for this class and eventually started using map and grep in all the programs.)
return if $_ <= 0;
print "Move disc $_ from $_ to $_\n";
made it shorter.
Kwyjibo. A big, dumb, balding North American ape. With no chin.