in reply to Re: confused about local $/ in perl debugger
in thread confused about local $/ in perl debugger

Your reply further confuses me. When I run your script in the debugger, $foo and $bar inside the subroutine are 42. The address of $foo and $bar changes appropriately.

In my OP, notice that the address of $/ changes appropriately but the value does not.

I'm runnning Perl 5.8.6 on Cygwin if this makes a difference.

lupey

Replies are listed 'Best First'.
Re^3: confused about local $/ in perl debugger
by fishbot_v2 (Chaplain) on May 24, 2005 at 14:47 UTC
    Yeah, and now I am confused too. I never should have offered debugger advice. I am seeing different results too. (on v5.8.0):

    # inside - main::changeRS DB<1> x $/ 0 undef DB<2> x \$/ 0 SCALAR(0xfab54) -> ' '

    I am seeing that the value changes if I evaluate at that point, but if I 'x' the reference I see a new location, but the old value.

    Also, I can now no longer reproduce my lexical oddness from before. I think that my one trial silently fell out of the inner scope. Even my local $bar example is behaving as both x \$bar and x $bar.

    Loath as I am to say this, (especially with my track record in this thread) I think that this is a bug in the debugger. I am going to test with other special vars...