in reply to How can a subroutine get its name?

caller() is the function you want. A subroutine can get its own name like this:

perl -e 'sub try { print +(caller(0))[3] }; try() '

Christian Lemburg
Brainbench MVP for Perl
http://www.brainbench.com