Help for this page

Select Code to Download


  1. or download this
    #!C:\perl\bin
    use strict;
    #use warnings;      # commented out because it throws a warning in the
    + middle
    ...
        sleep 1;
    #    clear ();  commented out so I can see the execution!
    }
    
  2. or download this
    Results of execution:
    Number of Disks: 3
    ...
                            x
                            xx
    Total: 7
    
  3. or download this
    C:\Perl\working>perl towers2.pl
    Not enough arguments for map at towers2.pl line 32, near """)"
    ...
    Global symbol "$polec" requires explicit package name at towers2.pl li
    +ne 84.
    Execution of towers2.pl aborted due to compilation errors.
     at towers2.pl line 91
    
  4. or download this
    my $i = 0;
    #my @polea;  #This was conflicting with the map initialization below
    ...
    32  print join "\t\t\t", map ($_->[$len] || ""), \$polea, \$poleb, \$p
    +olec;
        print "\n";
    }
    
  5. or download this
        print join "\t\t\t", map {[$_]->[$len] || ""} \my $polea, \my $pol
    +eb, \my $polec;
        print "\n";
    
  6. or download this
    
    A                       B                       C
    ...
    
    
    Total Moves: 31