in reply to Trying to track a sleeping CGI request with gdb

It might be overkill to use gdb for debugging a script. After all, you aren't debugging perl yet, are you? You could try to force the script to tell you where it got stuck via alarm:
#!/usr/bin/perl -w use strict; use Carp; $SIG{'ALRM'} = \&debug; alarm 5; sleep 1; sleep 1; sleep 1; sleep 1; sleep 1; sleep 1; sleep 1; sub debug { confess "here I got stuck:"; exit 1; } __END__ here I got stuck: at alarm.pl line 17 main::debug('ALRM') called at alarm.pl line 13 eval {...} called at alarm.pl line 13

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}