- 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!
}
- or download this
Results of execution:
Number of Disks: 3
...
x
xx
Total: 7
- 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
- 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";
}
- or download this
print join "\t\t\t", map {[$_]->[$len] || ""} \my $polea, \my $pol
+eb, \my $polec;
print "\n";
- or download this
A B C
...
Total Moves: 31