If you have the ability to attach a debugger like gdb to the process, then you can look at the value of the PL_evalseq variable (or on a threaded Perl, the value of my_perl->Ievalseq). For example in the following, perl588 and perl588t are unthreaded and threaded versions of perl:
$ perl588 -e 'eval "1;" for 1..10; sleep 9999' &
[1] 8491
$ gdb `which perl588` 8491
...
(gdb) p PL_evalseq
$1 = 0xa
(gdb) quit
$ perl588t -e 'eval "1;" for 1..10; sleep 9999' &
[1] 8525
$ gdb `which perl588t` 8525
...
(gdb) bt
#0 0x00110402 in __kernel_vsyscall ()
#1 0x003f2e20 in __nanosleep_nocancel () from /lib/libc.so.6
#2 0x003f2c6f in sleep () from /lib/libc.so.6
#3 0x08133397 in Perl_pp_sleep (my_perl=0x8837008) at pp_sys.c:4589
...
(gdb) frame 3
(gdb) p my_perl->Ievalseq
$1 = 0xa
(gdb)
Dave. |