On Thu, Dec 31, 2009 at 9:59 AM, Gabor Szabo <szab...@gmail.com> wrote: > On Thu, Dec 31, 2009 at 5:46 PM, Peng Yu <pengyu...@gmail.com> wrote: > >> In a 'perl -d', I try the following command, but it seems that it is >> not working as I expected. Can I input any arbitrary perl commands in >> the 'perl -d' session as if it is running by a perl interpreter? >> >> DB<10> my $count = 10; >> >> DB<11> print $count+1, "\n"; >> 1 >> >> DB<12> print $count, "\n"; >> >> >> DB<13> print "$count \n"; >> > > The debugger wraps you command in eval calls so if you declare a > variable using 'my' it will > immediately exit the scope and get destructed. > > You can do the above, just don't use 'my'. > Also you can use 'p' instead of 'print',
I want run whatever perl command in an interactive environment. If I can not use 'my', this is not what I am looking for. Of the tools that you recommended, which one can be used to run any arbitrary perl command? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/