in reply to Re^2: recursion basics
in thread recursion basics
Even slow that's a challenge. Why does the final return only run once? I mean, why doesn't the return interrupt the unwinding earlier?
Um, try this, and ask yourself what happens
Rip(); sub Rip { print "Rip on\n"; Van(); Winkle(); print "Rip off\n"; } sub Van { print "Van on\n"; Winkle(); print "Van off\n"; } sub Winkle { print "Winkle\n"; } __END__ Rip on Van on Winkle Van off Winkle Rip off
|
|---|