in reply to [untitled node, ID 193989]

Can a subroutine know its own name?

It can get its name by using one of the forms of caller(). Try this:

foo(); sub foo { my @callinfo = caller(0); print "i am $callinfo[3]\n"; }
Details in perlfunc.