in reply to how to goto &sysread ?

I'll have to agree with Anonymous Monk---using goto is frowned upon; however, there are times when you want to "pretend". In that case, I'd use AutoLoader. Here's an example where I follow the docs:
package Foo; use AutoLoader 'AUTOLOADER'; package Bar; use AutoLoader; AUTOLOAD(); print "OK...Done!\n" unless $@; __END__ sub AUTOLOAD { $AutoLoader::AUTOLOAD = "CORE::sysread", goto \&AutoLoader::AUTOLOAD; }
Update: Fixed awkward language and &AUTOLOAD

Replies are listed 'Best First'.
Re^2: how to goto &sysread ?
by ikegami (Patriarch) on Jul 25, 2011 at 01:37 UTC

    using goto is frowned upon

    Using goto to control flow is often frowned upon (even when it shouldn't be), but goto &name; doesn't do that.

    vthere are times when you want to pretend that you used a subroutine but didn't.

    goto &name; does the opposite. It removes a subroutine that did get called from the call stack.