[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: [ID 20000127.003] File-scope 'my' array is non-empty, but debugger
On Thu, Jan 27, 2000 at 06:31:01PM -0500, Ilya Zakharevich wrote:
> Rich Miller writes:
> > my @res = ("A\n");
> > print @res;
> >
> > Running this with "perl -w" or "perl -w -d" produces the expected output
> > (a line containing the single letter 'A'). But in the perl debugger,
> > the command
> > x @res
> > given after the first line executes, but before the second start,
> > erroneously reports
> > empty array
>
> More datapoints:
>
> DB<1> print @res
>
> DB<2> eval 'print @res'
> A
>
> Something fishy... eval '...' does not see it, but eval q(eval '...') can
> see it...
>
This is probably the problem:
[...]/lib/perl5/5.00503> grep \@res perl5db.pl
my @res;
@res = eval "$usercontext $evalarg;\n"; # '\n' for nice recursive
debug
dumpit($OUT, \@res);
@res;
Ronald
- Follow-Ups from:
-
Ilya Zakharevich <ilya@math.ohio-state.edu>
- References to:
-
Rich Miller <rmiller@rmiller1.idx.com>
Ilya Zakharevich <ilya@math.ohio-state.edu>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]