[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vps-mail] procmail : about reading info from ASCII files
- Subject: Re: [vps-mail] procmail : about reading info from ASCII files
- From: Scott Wiersdorf <scott@xxxxxxxxxxxx>
- Date: Sat, 8 Nov 2003 19:41:16 -0700
On Sun, Nov 09, 2003 at 02:55:22AM +0100, anon wrote:
> >:0H
> >* 10 ^From:.*bargain
> >* 10 ^From:.*casino
> >* 10 ^From:.*credit
> <snip>
> >* 10 ^From:.*rewards
> >* 10 ^From:.*awards
>
> Every condition will be excuted! They say to use the maximum number
> SUPREME = 9876543210
>
> as in
>
> * $SUPREME ^From:.*awards
>
> which will make the recipe finish on the first true condition
Actually, that's:
* $ $SUPREME^0 ^From:.*awards
The leading '$' says "do shell interpolation (i.e., expand variables)
after this point". Since $SUPREME is a variable, we want it's value,
not simply the string '$SUPREME' (discussed in proctip2).
Other than that, you're right of course. For long lists, you'll want
to use the SUPREMUM value; for short lists, it doesn't hurt much to
scan several times (unless you're scanning the body, in which case
each one can hurt a lot if the body is large). It's a good habit to
get into.
Scott
--
Scott Wiersdorf
scott@xxxxxxxxxxxx
======================================================================
This is <vps-mail@xxxxxxxxxxxx> <http://www.perlcode.org/lists/>
======================================================================
Main Index |
Thread Index