in reply to name of executing sub?

arley_ge:

In vi, you could use something like: ?^sub

On a more serious note, when you're writing your code, you know what the name of your subroutine is that you're writing, so I presume you mean to determine the name of the subroutine that's calling the one you're writing. In that case, you could use the caller function to check the stack frame.

If you're meaning that you want the subroutine running at a specific point in time, I guess you could use a timer in conjunction with a signal handler to interrupt your program at a particular point in time. I've never tried it, but if you do so, I'm guessing you could use caller to determine what routine you were in when the signal fired.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

Replies are listed 'Best First'.
Re^2: name of executing sub?
by arley_ge (Initiate) on Jan 10, 2014 at 18:57 UTC

    Yes, calling subroutine is what I meant. Doh!

    Thanks for your kind reply.