in reply to Strange behavior of "my" in "perl -d" and "perl -de"

Yup, and perldoc perldebug mentions this fact.

Note that the said "eval" is bound by an implicit scope. As a r +esult any newly introduced lexical variable or any modified capture b +uffer content is lost after the eval. The debugger is a nice environm +ent to learn Perl, but if you interactively experiment using material +which should be in the same scope, stuff it in one line.

Replies are listed 'Best First'.
Re^2: Strange behavior of "my" in "perl -d" and "perl -de"
by johnnywang (Priest) on Apr 16, 2005 at 06:02 UTC
    I still don't understand, why then is the first experiment using "perl -d devel.pl" producing the correct reference count?

      This warning applies only to code you type in interactively. Read all of the surrounding section in perldoc perldebug and it should make more sense.