On Wed, 21 Dec 2011 09:48:19 -0600 Robert Wohlfarth <rbwohlfa...@gmail.com> wrote:
> On Tue, Dec 20, 2011 at 11:25 AM, Motaz SAAD <motaz.s...@gmail.com> wrote: > > > I am a beginner in perl and I have segmentation fault in my code. the > > code run perfectly for the until the third iteration and it produce > > segmentation fault in the inner while loop in the 3rd iteration of > > the outer while loop. > > Would you please help me with hints. > > Your help will be appreciated > > > > If it were me, I would add "print" statements inside of the loop (see > below). When it segfaults, you see which two "print"s the error comes > between. Then move those closer and closer until you find the line causing > the error. That narrows down the scope. It looks like you started down > that path already... You can achieve the same effect much more easily and without polluting your code using Devel::Trace : * http://search.cpan.org/dist/Devel-Trace/ There's also http://search.cpan.org/dist/Devel-Trace-More/ and my own http://search.cpan.org/dist/Devel-LineTrace/ (which does something a bit different than the others) which may prove of use. Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ "Star Trek: We, the Living Dead" - http://shlom.in/st-wtld No one calls Xena the warrior princess “Zeena” to her face and survives. Luckily for you, she hasn’t visited the modern day United States yet. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/