in reply to To Debug a Hanging Perl Script

Auto-flush STDOUT ($| = 1;) so you can see everything that's printed as it is printed. Then you can add print statements (or warns) to track the progress of your script.

Replies are listed 'Best First'.
Re^2: To Debug a Hanging Perl Script
by spiritway (Vicar) on Mar 03, 2006 at 09:16 UTC

    Along the same lines you could change your print statements to warn, which will give you information as to where you are in the script.

    Update: Oops... I see you already mentioned them...

Re^2: To Debug a Hanging Perl Script
by Anonymous Monk on Mar 03, 2006 at 09:32 UTC
    Hi ikegami,
    Where and how should I put this line in my script?
    Auto-flush STDOUT ($| = 1;)
      Anywhere. Presumably near the top so it gets executed soon. And it's:
      $| = 1; # Auto-flush STDOUT