procmail
[Top] [All Lists]

Re: Howto use variables in regexp's ???

2003-09-25 21:40:28
On Thu, Sep 25, 2003 at 10:22:56PM -0500, Michael D Schleif wrote:
Which side of the weight/exponent does this `$' belong?

It doesn't really matter, unless you're using a variable in your
scoring, in which case you'll need to put the '$' before the score
stuff:

    FOO=3

    :0
    * $ $FOO^0 ^Subject: foo
    ...

As the manpage states, everything after the '$' will be parsed
and interpolated sh-style. If you're not doing variable scoring, it's
largely a matter of style and preference. Many people like to delay
the '$' as long as possible (though I don't know why, particularly).

Dallman Ross's style (like many others on this list) has a clean style
(easy to read and maintain) that would be good to emulate if you're
just getting started (or still open to persuasion).

Scott
-- 
Scott Wiersdorf
scott(_at_)perlcode(_dot_)org

_______________________________________________
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>