use strict; use vars q{$AUTOLOAD}; dostuff("One"); dostuff2("Two"); sub AUTOLOAD { no strict "refs"; print "Entering sub $AUTOLOAD.\n"; my $sub=join "::_", split /::/,$AUTOLOAD; &$sub(@_); print "Exiting sub $AUTOLOAD.\n"; } sub _dostuff { print "We're in dostuff: @_.\n"; } sub _dostuff2 { print "We're in dostuff2: @_.\n"; } __END__ Entering sub main::dostuff. We're in dostuff: One. Exiting sub main::dostuff. Entering sub main::dostuff2. We're in dostuff2: Two. Exiting sub main::dostuff2.