On Wed, Jan 29, 2003 at 03:29:57PM -0500, Aaron Sherman wrote:
> On Wed, 2003-01-29 at 14:54, Jonathan Scott Duff wrote:
> 
> > Can someone give me a realish world example of when you would want an
> > array that can store both undefined values and default values and those
> > values are different?
> 
> my @send_partner_email is default(1);
> while $websignups.getline {
>       ($id) = /UserID: (\d+)/;
>       if /Source: External DB With No Privacy Policy/ {
>               @send_partner_email[$id] = undef; # No answer given
>       } elsif /Spam Me: Yes/ {
>               @send_partner_email[$id] = 1;
>       } else {
>               @send_partner_email[$id] = 0;
>       }
> }
> # If you were not in the websignups list, you signed up before privacy
> # policy, so we spam you (default=1)

But aren't those values arbitrary?  Couldn't you just have
easily used -1 instead of undef?  Why would undef be necessary or
preferred?

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]

Reply via email to