procmail
[Top] [All Lists]

RE: ^^3^^

2002-10-28 17:35:08
David W. Tamkin wrote:


Dallman Ross wants to use,

|       * $ ! $= ?? ^^3^^

The var ?? syntax doesn't work with special variables, and 
keeping the dollar sign doesn't make it work.  You need to 
save it in a plain variable first, as Sean Straw was illustrating:

SAVEDSCORE = $=

and as the condition,

 * SAVEDSCORE ?? ^^3^^

Okay, thanks for the confirmation, David.



However, I would advise against doing this:

  * $ -$SAVEDSCORE^0


Hmm.  I do that kind of thing not infrequently, actually.



because, if $SAVEDSCORE is already negative, procmail expands it to

 * --somenumber^0

which is taken as a regexp (and the caret to represent a 
newline) rather than
a scoring weight.  The best way I've found to subtract a 
number in a variable
is this:

 * $ $VARIABLE^-2 HOST ?? ^^.|.^^

Wow.  I know you had anticipatory pleasure out of blowing
my mind with that one.  Care to explain it for those of
use whose IQs are below 200?  :)

dman

P.S.  I have a typo in the recipe set I posted.  I left out
a hash-mark.  Here is a correction:

 :0 E  # 021029 () else, disposition notifications get another chance



-- 
Dallman Ross


"If you find a path with no obstacles, it probably does not lead to
anywhere."
        Thoughts of Rev. Sunnan Kubose, from _Zen in the Markets_ 


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>