Glenn Linderman <[EMAIL PROTECTED]> writes: > 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; Why on earth would you want to do this in real code? I don't believe you actually need both semantics active at the same time; it might take really minor rewording of the code (initialize to 0 instead of undef for counters, etc.), but I'm very unconvinced that you need both concepts active at the same time. -- Russ Allbery ([EMAIL PROTECTED]) <http://www.eyrie.org/~eagle/>
- Re: RFC 263 (v1) Add null() keyword and fund... Paris Sinclair
- Re: RFC 263 (v1) Add null() keyword and fundamental ... John Porter
- Re: RFC 263 (v1) Add null() keyword and fundamen... Glenn Linderman
- Re: RFC 263 (v1) Add null() keyword and fund... Tom Christiansen
- Re: RFC 263 (v1) Add null() keyword and ... iain truskett
- Re: RFC 263 (v1) Add null() keyword... Tom Christiansen
- Re: RFC 263 (v1) Add null() keyword... iain truskett
- Re: RFC 263 (v1) Add null() keyword and ... Glenn Linderman
- Re: RFC 263 (v1) Add null() keyword... Tom Christiansen
- Re: RFC 263 (v1) Add null() keyword... Damien Neil
- Re: RFC 263 (v1) Add null() keyword and fund... Russ Allbery
- Re: RFC 263 (v1) Add null() keyword and ... Graham Barr
- Re: RFC 263 (v1) Add null() keyword... Tom Christiansen
- Re: RFC 263 (v1) Add null() keyword... Glenn Linderman
- Re: RFC 263 (v1) Add null() keyword and fundamental data ... Glenn Linderman
- Re: RFC 263 (v1) Add null() keyword and fundamental ... Russ Allbery
- Re: RFC 263 (v1) Add null() keyword and fundamen... Glenn Linderman
- Re: RFC 263 (v1) Add null() keyword and fund... Russ Allbery
- Re: RFC 263 (v1) Add null() keyword and ... Graham Barr
- Re: RFC 263 (v1) Add null() keyword and ... Glenn Linderman
- Re: RFC 263 (v1) Add null() keyword... Tom Christiansen