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
In reply to Re^3: recursion basics
by Anonymous Monk
in thread recursion basics
by wrinkles
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |