David W. Tamkin wrote:
Dallman Ross wrote,
One does need to keep in mind, though, that in procmail there is
no real difference between unset and set-to-null; at least in
how we read or expand the parameters inside procmail.
That's by our choice, Dallman. There *normally* is no real
difference to procmail users between null variables and
unset ones. In most cases we care only about whether a
variable is non-null or not non-null, so we use conditions
like these:
* var ?? .
or
* var ?? ^^^^
which treat the null and the unset alike. But that's a user choice.
When a situation arises where it makes a difference, procmail
can handle it. . . .
I'll never forget what happened on this list when someone
asked, "How do I test whether a variable is set but null?" A
flood of replies came, none of them . . . helpful . . . .
When I checked email and saw the load of wrong answers, I
just shook and shook my head. Then I sighed and posted,
* $ !${VAR+!}${VAR:+!}
Thanks for the wisdom, David. That all must have happened in the
circa nine or ten months that transpired three years ago when I
was not following this list, I'm afraid. Other than that period,
and perhaps one other of around the same length, I've been here
for ten years. But I have absolutely no recollection of that.
If it was more recently, it may have zoomed right over my head,
anyway; and sometimes I don't have time for more than skimming here.
That code of yours there looks like it'd dripping with gravitas,
and I'm not being facetious. But I confess that my brain is
numb and I don't quite get it. So maybe you can explain; I'd
be grateful.
Dallman
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail