in reply to Re^6: Convenient way to use 5.10 features in perldebugger?
in thread Convenient way to use 5.10 features in perldebugger?

Sadly, no, they have their own scope:
DB<9> < my $f = 42; DB<10> x $f 0 undef DB<11> << local $g = 15; DB<12> x $g 0 undef

Replies are listed 'Best First'.
Re^8: Convenient way to use 5.10 features in perldebugger?
by LanX (Saint) on Aug 15, 2010 at 18:32 UTC
    not a matter of scope...

    DB<32> < $main::a++ DB<33> print $main::a 5 DB<34> print $main::a 5 DB<35> print $main::a 5

    maybe the use is restricted to real debugging (breakpoints and so on ..) and not meant for interactive shells.

    Cheers Rolf

      Your code does not demonstrate your statement. Showing you can access the value of a global variable does not say anything about scope.
        I said:
        not a matter of scope ...

        Obviously the value is not incremented automatically!

        Cheers Rolf

      > maybe the use is restricted to real debugging (breakpoints and so on ..) and not meant for interactive shells.

      actually that's the case, e.g. when stepping with n thru a program the pre- and post-prompt commands are executed.

      They are NOT executed when entering any perl lines.

      to test try something like  perl -de'for (1..1000) {0}' and type n.

      And BTW all these automatic commands have their own scope.

      Cheers Rolf