John Porter wrote: > Nathan Wiger wrote: > > > > undef null > > ------------------------ ------------------------ > > $a = undef; $a = null; > > $b = 1; $b = 1; > > $c = $a + b; $c = $a + $b; > > $c is 1 $c is null > > Uh, this is a difference in the implementations of the '+' > operator, not the data value undef/null. > Operators that treat undef the way SQL treats null are > trivial to implement. With the multitudinous operator approach, please show me how to make each of the following conditional statements print true, without cluttering the code with interleaved additional pragmas and scoping blocks. Use of pragmas before the code might be acceptable. no strict; $a = undef; $b = null; $c = $a + $b; $d = $a + 1; $e = $b + 1; print "true" if defined $c; print "true" if defined $b; print "true" if isnull $e; print "true" if defined $d; print "true" if $d == 1; print "true" if $e != 1; print "true" if ! ($b == 0); print "true" if $a == 0; The multitudinous operator approach is not a solution. -- Glenn ===== Even if you're on the right track, you'll get run over if you just sit there. -- Will Rogers _____NetZero Free Internet Access and Email______ http://www.netzero.net/download/index.html
- Re: RFC 263 (v1) Add null() keyword and ... Glenn Linderman
- Re: RFC 263 (v1) Add null() keyword and ... Russ Allbery
- Re: RFC 263 (v1) Add null() keyword and ... Glenn Linderman
- Re: RFC 263 (v1) Add null() keyword and ... Russ Allbery
- Re: RFC 263 (v1) Add null() keyword and ... Glenn Linderman
- Re: RFC 263 (v1) Add null() keyword and ... John Porter
- Re: RFC 263 (v1) Add null() keyword and ... Russ Allbery
- Re: RFC 263 (v1) Add null() keyword and ... Glenn Linderman
- Re: RFC 263 (v1) Add null() keyword and fundamen... Paris Sinclair
- Re: RFC 263 (v1) Add null() keyword and fundamental data ... John Porter
- Re: RFC 263 (v1) Add null() keyword and fundamental ... Glenn Linderman
- Re: RFC 263 (v1) Add null() keyword and fundamen... Tom Christiansen
- Re: RFC 263 (v1) Add null() keyword and fund... iain truskett
- Re: RFC 263 (v1) Add null() keyword and ... Tom Christiansen
- Re: RFC 263 (v1) Add null() keyword and ... iain truskett
- Re: RFC 263 (v1) Add null() keyword and fund... Glenn Linderman
- Re: RFC 263 (v1) Add null() keyword and ... Tom Christiansen
- Re: RFC 263 (v1) Add null() keyword and ... Damien Neil
- Re: RFC 263 (v1) Add null() keyword and fundamen... Russ Allbery
- Re: RFC 263 (v1) Add null() keyword and fund... Graham Barr
- Re: RFC 263 (v1) Add null() keyword and ... Tom Christiansen