procmail
[Top] [All Lists]

Can variables be nested?

2004-05-22 15:25:22
I'd like to assemble sets of ORed words, which I have assigned to
variables, into yet other sets of variables.  That is, I end up
with variables containing other variables.  So far, I haven't been
able to get procmail to recognize the nested vars.

Is there a way to do this?

For a contrived example:

XXX = '(foo|bar)'
YYY = '(${dynamicvar}|aaa|bbb)'

...

later, dynamicvar gets set to something.  Then, we have something like:

:0 B
* $ -1^1 ${XXX}
* $  1^1 ${YYY}
{
        ...
}

but the ${YYY} regex can't seem to get the value of dynamicvar.

It'd be nice if dynamic variables could be organized this way.  I've
tried all the obvious combinations of enclosing in double quotes and
escaping the dollars, but I always end up with either null or a literal
``${dynamicvar}'' in the final scoring regex.

If there's no way, I'd like to know so that I can stop wasting my time,
but if I'm overlooking the secret, I look forward to enlightenment.

I realize I could possibly contrive to define "YYY" after "dynamicvar"
is set, but relying on that sort of order makes me skeptical, and I'd
like to know if there's a solution to the general case. 

TIA,

Jim

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