in reply to strange issue w/ script "hanging"

If this is being run by Apache try and run it (httpd) with the -X flag which doesn't fork off any children (the one process handles a single request). If that still hangs, try running httpd -X under whatever your OS' system call tracing facility is (strace, ktrace/kdump, or truss; be sure to tell it to follow across forks) and see if that gives any insight into where it's hanging and what it's trying to accomplish underneath. Or perhaps change your #! line to use Devel::Trace and see if that dumps anything enlightening into your error log.