On Tuesday 09 November 2004 11:33, Paul Johnson wrote:
> On Tue, Nov 09, 2004 at 11:40:30AM -0600, Joseph Paish wrote:
> > BTW, i think i may have found out what is giving me the strange line
> > numbers in the debugger under emacs.  it seems that when i enter "p $."
> > at the debugger prompt, it displays whatever line number the debugger
> > just printed out.  for example, if i have 17 debugger prompts before i
> > issue the "p $." command, it will display 17 instead of the line number
> > of the file i am reading at the time (which should be 1 if i just started
> > reading the file).
> >
> > ok, now this is getting strange.  i inserted some print statements in my
> > large script, and they showed that in fact, i had been entering the first
> > if() structure all along.  the debugger was showing me bypassing it and
> > going straight to the second one.  maybe based on the bogus $. values
> > that the debugger thought were accurate? (see previous paragraph)
> >
> > anyway, except for the debugger not working properly under emacs, i guess
> > there is no problem with the "if ($. == 1) structure .  unfortunately, i
> > have grown to depend on the debugger to help me spot logic errors in my
> > code.  i guess i am going to have to go back to simple print statements
> > or run it from the commandline where i *just* found out that it gives me
> > the correct output.
>
> You don't tell us which version of perl you are running, which is always
> helpful in situations such as this, but my guess is that it is ancient.
>
> There was a bug in perl5.6.0 and earlier versions of perl which would
> cause this behaviour.  The bug was fixed by this patch, over four years
> ago: http://public.activestate.com/cgi-bin/perlbrowse?patch=6023
>
> If I am correct, and you are running 5.6.0 or earlier, I suggest you
> upgrade in order to fix this problem and many others you might
> encounter.  The latest maintenance release is 5.8.5 - I recommend it.

first of all, thanks to all the people that have helped me with my $. 
problem, both on and off this mailing list.  

i guess i could have made things a lot simpler if i had mentioned the version 
number to start with.  i was (and still am) running 5.6.0, and have just 
downloaded 5.8.5.  

i will probably be starting another thread (or asking the comp.lang.perl.misc 
newsgroup) about things to watch out for when installing another version on 
top of an existing one.

thanks again

joe


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to