pjbrenner wrote:
I cannot put print statements in because the program is to large and I don't yet know where it is failing.
Personally, I find that the size of a program is usually irrelevant to finding out where to put print statements for debugging. I trace the program flow and essentially use a binary search to narrow down where to put the print statements.
A simple example: for 500 lines of code, I put a print at 250. Does the program die before it? I put the print at 750. A binary search quickly narrows down where the problem is.
For your error message, it sounds like you may have an object instantiation that is returning undef, or an unblessed reference. grep the code base for the word "format" and see how your program might be trying to access the appropriate code.
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
In reply to Re: Debugging Perl Program
by Ovid
in thread Debugging Perl Program
by pjbrenner
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |