RE: Default values, was RE: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread David Whipp
Aaron Sherman wrote: > Someone's missing something, and I sure hope it's not me. Let me write > a code sample here: > > sub incrind (@ary, $ind) { > @ary[$ind]++ > } > > Are you suggesting that by adding in "@ary ^= 0", like so: > > sub incrind (@ary, $ind) { >

Re: Default values, was RE: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Aaron Sherman
On Mon, Oct 22, 2001 at 01:36:02PM -0700, David Whipp wrote: > OK, now we've got this resolved, I'd like to return the focus > back to the original point. > > @x ^= 0; > @x[5]++; > > does not have problems with NaNs; and does not generate a warning > with -w. Someone's missing some

RE: Default values, was RE: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread David Whipp
> > Aaron Sherman wrote > Larry's hubris notwithstanding, I'd like to suggest that > "more", in this > case means "no, it prints nothing". > > This *must* be true, as you don't want: > > @a ^+ @b > > to always return an infinite list. You want it to produce a list with > (as a3 suggested

Re: Default values, was RE: the handiness of undef becoming NaN (when you want that)

2001-10-22 Thread Aaron Sherman
On Mon, Oct 22, 2001 at 12:23:34PM -0700, David Whipp wrote: > Aaron Sherman wrote > > > > my @a; > > @a ^= 0; > > print @a > > > > Are you saying that this should print an infinite number of zeros? > > > > Quoting Larry on this subject (apocalypse 3, bottom of page 3): "I > can th