Is there a way to determine if the current file is the one being executed in Perl source? In Python we do this with the following construct:
if __name__ == \'__m
unless (caller) { print "This is the script being executed\n"; }
See caller. It returns undef in the main script. Note that that doesn't work inside a subroutine, only in top-level code.
undef