It can get its name by using one of the forms of caller(). Try this:
Details in perlfunc.foo(); sub foo { my @callinfo = caller(0); print "i am $callinfo[3]\n"; }
In reply to Re: Subroutine names internally
by dws
in thread [untitled node, ID 193989]
by Samn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |