C:\test>perl -d:Trace junk72.pl
>> [0] junk72.pl : 16: hanoi( 3, 'A', 'C', 'B' );
>> [0] junk72.pl : 5: my ($n, $start, $end, $extra) = @_;
>> [0] junk72.pl : 6: if ($n == 1) {
>> [0] junk72.pl : 10: hanoi($n-1, $start, $extra, $end);
>> [0] junk72.pl : 5: my ($n, $start, $end, $extra) = @_;
>> [0] junk72.pl : 6: if ($n == 1) {
>> [0] junk72.pl : 10: hanoi($n-1, $start, $extra, $end);
>> [0] junk72.pl : 5: my ($n, $start, $end, $extra) = @_;
>> [0] junk72.pl : 6: if ($n == 1) {
>> [0] junk72.pl : 7: print "Move disk #1 from $start to $end.";
Move disk #1 from A to C.
>> [0] junk72.pl : 11: print "Move disk #$n from $start to $end.";
Move disk #2 from A to B.
>> [0] junk72.pl : 12: hanoi($n-1, $extra, $end, $start);
>> [0] junk72.pl : 5: my ($n, $start, $end, $extra) = @_;
>> [0] junk72.pl : 6: if ($n == 1) {
>> [0] junk72.pl : 7: print "Move disk #1 from $start to $end.";
Move disk #1 from C to B.
>> [0] junk72.pl : 11: print "Move disk #$n from $start to $end.";
Move disk #3 from A to C.
>> [0] junk72.pl : 12: hanoi($n-1, $extra, $end, $start);
>> [0] junk72.pl : 5: my ($n, $start, $end, $extra) = @_;
>> [0] junk72.pl : 6: if ($n == 1) {
>> [0] junk72.pl : 10: hanoi($n-1, $start, $extra, $end);
>> [0] junk72.pl : 5: my ($n, $start, $end, $extra) = @_;
>> [0] junk72.pl : 6: if ($n == 1) {
>> [0] junk72.pl : 7: print "Move disk #1 from $start to $end.";
Move disk #1 from B to A.
>> [0] junk72.pl : 11: print "Move disk #$n from $start to $end.";
Move disk #2 from B to C.
>> [0] junk72.pl : 12: hanoi($n-1, $extra, $end, $start);
>> [0] junk72.pl : 5: my ($n, $start, $end, $extra) = @_;
>> [0] junk72.pl : 6: if ($n == 1) {
>> [0] junk72.pl : 7: print "Move disk #1 from $start to $end.";
Move disk #1 from A to C.