in reply to determining the line# of code when an alarm() trips?
Not a direct answer to your question, but perhaps Devel::Trace (or simply running under the debugger) might show up the offending portion of code?