in reply to Methods to debug CGI issues

you could use something like Devel::DProf to dump a profile of your data, and have 'dprofpp -T' print out the call tree of your program. That should give you some idea on what is happening.