On Sun, Aug 01, 2004 at 02:16:23PM -0600, Justin Gombos wrote:
* Dallman Ross <dman(_at_)nomotek(_dot_)com> [2004-07-31 08:09]:
:0 D # 040430 () normalize case of Return-Path
* RP ?? [A-Z]
{ rp = `echo "$RP" | tr '[:upper:]' '[:lower:]'` }
That's a good point. I'm doing potentially unnecessary case
conversions for every mailing list message. But then if I inject this
code above in every instance, I think it would come at the cost of
readability. What I'll probably do is encapsulate that in a single
file, then do an INCLUDERC whenever I need to set the listname
variable.
I've been wondering how long the $MATCH variable persists after it's
set. Is $MATCH cleared upon exiting a recipe?
It persists until something erases or replaces it or session ends.
As to your first remark, well, there's readable, and then there's readable.
(Or rather unreadable, and unreadable.) If you know what I mean.
I don't think that is particularly bad, and the D flag already
gives us a hint that something's up, so we're prepared for some kind
of test. Remember that INCLUDERCs will require file reads, which
isn't generally a problem but which aren't totally free, either.
You could make the look cleaner if you wanted by presetting
some vars. Then you could have something like
Distinguish_case = "D"
UPPERCASE = "[A-Z]"
:0 $Distinguish_case
* $ MYSTRING ?? $UPPERCASE
{ INCLUDERC = lowercase.rc }
--
dman
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail