Bart Lateur <[EMAIL PROTECTED]> wrote:
>       grep { defined && !$_ } FLAG

To extend that, if you want to test for (state(s)) use (code):

state   code
undef   !defined FLAG
0       grep defined && !$_, scalar FLAG;
1       FLAG
undef,0 !FLAG
undef,1 grep !defined || $_, scalar FLAG;
0,1     defined FLAG
undef,0,1       1 :)

Yuck.

Reply via email to