use the
caller function
$this_function=(caller(0))[3];
The array caller returns looks like this:
($package, $filename, $line, $subroutine, $has_args, $wantarray)=caller($i);
# 0 1 2 3 4 5
you call caller with a parameter of how many subroutine calls back you want to go... in your case 0