in reply to Re: Where is implementation of $0 in Perl source code
in thread Where is implementation of $0 in Perl source code

Update: I just noticed that you specified within a single file. Ok:
$ perl -le'$0="Foo"; sub f { print "$0,", (caller)[1] } f()' Foo,-e

Dave.