ilya@math.ohio-state.edu wrote > $a = 5; > > sub a { print $a } > sub b {local $b = 9; goto &a} $a > b; > > This prints 5. "Should" not it print 9 instead? That was my initial reaction, but the documentation suggests rather strongly that *all* effects of b() are undone: The `goto-&NAME' form is highly magical, and substitutes a call to the named subroutine for the currently running subroutine. This is used by `AUTOLOAD' subroutines that wish to load another subroutine and then pretend that the other subroutine had been called in the first place (except that any modifications to `@_' in the current subroutine are propagated to the other subroutine.) >>>>>>> After the `goto', not even `caller()' will be able to >>>>>>> tell that this routine was called first. Mike GuyThread Previous | Thread Next